Dynomotion

Group: DynoMotion Message: 8009 From: Bengt Sjoelund Date: 7/29/2013
Subject: Re: How to setup bits
Hi Kfloppers,

Now I am back again and need some help with homeing G28.1
As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/

I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.

Still on 428 and std 1024.set in Mach3

I just cannot get this working so can you guys help out with this.

Cheers from Sweden
Bengt





--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Guys,
>
> Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> Cheers
> Bengt
>
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Troy,
> >  
> > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> >  
> > Regards
> > TK
> >
> > From: tmday7 <tmday@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, April 26, 2012 11:33 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > >  
> > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > >  
> > > Regards
> > > TK
> > >
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, April 26, 2012 11:00 AM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >  
> > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > >
> > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > >
> > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Sorry, long time no VB editing ;)
> > > > > Yes my button is the same
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > >
> > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > This is the VB that is in mine...
> > > > > > > DoButton( 24 )
> > > > > > > DoButton( 23 )
> > > > > > > DoButton( 22 )
> > > > > > > DoButton( 25 )
> > > > > > >
> > > > > > > DoOEMButton(133)
> > > > > > > DoOEMButton(134)
> > > > > > > DoOEMButton(135)
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Hi Troy,
> > > > > > > >
> > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > Cheers
> > > > > > > > Bengt
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Bengt,
> > > > > > > > > Hope iam not intruding here.
> > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Tom,
> > > > > > > > > >
> > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > >
> > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > >
> > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > >
> > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > Cheers
> > > > > > > > > > Bengt
> > > > > > > > > >
> > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > >
> > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > >
> > > > > > > > > > main()
> > > > > > > > > > {
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > // Home the X-axis
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > #define X 0
> > > > > > > > > >
> > > > > > > > > > DisableAxis(X);
> > > > > > > > > >
> > > > > > > > > > Zero(X);
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > >
> > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > >
> > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > >
> > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > >
> > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > >
> > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > >
> > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > >
> > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > >
> > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > >
> > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > >
> > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > >
> > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > >
> > > > > > > > > > DisableAxis(X);
> > > > > > > > > >
> > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > // Home the Y-axis
> > > > > > > > > >
> > > > > > > > > > #define y 1
> > > > > > > > > >
> > > > > > > > > > DisableAxis(y);
> > > > > > > > > >
> > > > > > > > > > Zero(y);
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > >
> > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > >
> > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > >
> > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > >
> > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > >
> > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > >
> > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > >
> > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > >
> > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > >
> > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > >
> > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > >
> > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > >
> > > > > > > > > > DisableAxis(y);
> > > > > > > > > >
> > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > // Home the Z-axis
> > > > > > > > > >
> > > > > > > > > > #define z 2
> > > > > > > > > >
> > > > > > > > > > DisableAxis(z);
> > > > > > > > > >
> > > > > > > > > > Zero(z);
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > >
> > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > >
> > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > >
> > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > >
> > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > >
> > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > >
> > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > >
> > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > >
> > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > >
> > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > >
> > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > >
> > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > >
> > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > >
> > > > > > > > > > DisableAxis(z);
> > > > > > > > > >
> > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > >
> > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > }
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8010 From: tmday7 Date: 7/29/2013
Subject: Re: How to setup bits
Hello Bengt,
What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Kfloppers,
>
> Now I am back again and need some help with homeing G28.1
> As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
>
> I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
>
> Still on 428 and std 1024.set in Mach3
>
> I just cannot get this working so can you guys help out with this.
>
> Cheers from Sweden
> Bengt
>
>
>
>
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Guys,
> >
> > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > Cheers
> > Bengt
> >
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Troy,
> > >  
> > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > >  
> > > Regards
> > > TK
> > >
> > > From: tmday7 <tmday@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Thursday, April 26, 2012 11:33 AM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >  
> > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt,
> > > >  
> > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > >  
> > > > Regards
> > > > TK
> > > >
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > >  
> > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > >
> > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > >
> > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Sorry, long time no VB editing ;)
> > > > > > Yes my button is the same
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > >
> > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > This is the VB that is in mine...
> > > > > > > > DoButton( 24 )
> > > > > > > > DoButton( 23 )
> > > > > > > > DoButton( 22 )
> > > > > > > > DoButton( 25 )
> > > > > > > >
> > > > > > > > DoOEMButton(133)
> > > > > > > > DoOEMButton(134)
> > > > > > > > DoOEMButton(135)
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Troy,
> > > > > > > > >
> > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > Cheers
> > > > > > > > > Bengt
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Bengt,
> > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Tom,
> > > > > > > > > > >
> > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > >
> > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > >
> > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > >
> > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > Cheers
> > > > > > > > > > > Bengt
> > > > > > > > > > >
> > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > >
> > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > >
> > > > > > > > > > > main()
> > > > > > > > > > > {
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > // Home the X-axis
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > #define X 0
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > >
> > > > > > > > > > > Zero(X);
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > >
> > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > >
> > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > >
> > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > >
> > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > >
> > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > >
> > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > >
> > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > >
> > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > >
> > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > >
> > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > >
> > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > >
> > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > >
> > > > > > > > > > > #define y 1
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > >
> > > > > > > > > > > Zero(y);
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > >
> > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > >
> > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > >
> > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > >
> > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > >
> > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > >
> > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > >
> > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > >
> > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > >
> > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > >
> > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > >
> > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > >
> > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > >
> > > > > > > > > > > #define z 2
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > >
> > > > > > > > > > > Zero(z);
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > >
> > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > >
> > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > >
> > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > >
> > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > >
> > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > >
> > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > >
> > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > >
> > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > >
> > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > >
> > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > >
> > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > >
> > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > >
> > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > >
> > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > >
> > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > }
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8011 From: Bengt Sjoelund Date: 7/29/2013
Subject: Re: How to setup bits
Hello Troy,

Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@...> wrote:
>
> Hello Bengt,
> What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Kfloppers,
> >
> > Now I am back again and need some help with homeing G28.1
> > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> >
> > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> >
> > Still on 428 and std 1024.set in Mach3
> >
> > I just cannot get this working so can you guys help out with this.
> >
> > Cheers from Sweden
> > Bengt
> >
> >
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Guys,
> > >
> > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > Cheers
> > > Bengt
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Troy,
> > > >  
> > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > >  
> > > > Regards
> > > > TK
> > > >
> > > > From: tmday7 <tmday@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > >  
> > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Bengt,
> > > > >  
> > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > >  
> > > > > Regards
> > > > > TK
> > > > >
> > > > > From: Bengt Sjoelund <cnc@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > >
> > > > >
> > > > >  
> > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > >
> > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Sorry, long time no VB editing ;)
> > > > > > > Yes my button is the same
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > >
> > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > This is the VB that is in mine...
> > > > > > > > > DoButton( 24 )
> > > > > > > > > DoButton( 23 )
> > > > > > > > > DoButton( 22 )
> > > > > > > > > DoButton( 25 )
> > > > > > > > >
> > > > > > > > > DoOEMButton(133)
> > > > > > > > > DoOEMButton(134)
> > > > > > > > > DoOEMButton(135)
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Troy,
> > > > > > > > > >
> > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > Cheers
> > > > > > > > > > Bengt
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > >
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > >
> > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > >
> > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > >
> > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > >
> > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > Cheers
> > > > > > > > > > > > Bengt
> > > > > > > > > > > >
> > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > >
> > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > >
> > > > > > > > > > > > main()
> > > > > > > > > > > > {
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > #define X 0
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(X);
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > >
> > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > >
> > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > >
> > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > >
> > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > >
> > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > >
> > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > >
> > > > > > > > > > > > #define y 1
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(y);
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > >
> > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > >
> > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > >
> > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > >
> > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > >
> > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > >
> > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > >
> > > > > > > > > > > > #define z 2
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(z);
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > >
> > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > >
> > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > >
> > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > >
> > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > >
> > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > >
> > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > >
> > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > >
> > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > >
> > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > >
> > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > >
> > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > }
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8012 From: Bengt Sjoelund Date: 7/29/2013
Subject: Re: How to setup bits
Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
/Bengt

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hello Troy,
>
> Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> >
> > Hello Bengt,
> > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Kfloppers,
> > >
> > > Now I am back again and need some help with homeing G28.1
> > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > >
> > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > >
> > > Still on 428 and std 1024.set in Mach3
> > >
> > > I just cannot get this working so can you guys help out with this.
> > >
> > > Cheers from Sweden
> > > Bengt
> > >
> > >
> > >
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Guys,
> > > >
> > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > Cheers
> > > > Bengt
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Troy,
> > > > >  
> > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > >  
> > > > > Regards
> > > > > TK
> > > > >
> > > > > From: tmday7 <tmday@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > >
> > > > >
> > > > >  
> > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Bengt,
> > > > > >  
> > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > >  
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > >
> > > > > >
> > > > > >  
> > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > >
> > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > >
> > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > Yes my button is the same
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > >
> > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > DoButton( 24 )
> > > > > > > > > > DoButton( 23 )
> > > > > > > > > > DoButton( 22 )
> > > > > > > > > > DoButton( 25 )
> > > > > > > > > >
> > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > DoOEMButton(135)
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Troy,
> > > > > > > > > > >
> > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > Cheers
> > > > > > > > > > > Bengt
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > >
> > > > > > > > > > > > Troy
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > >
> > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > >
> > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > >
> > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > Bengt
> > > > > > > > > > > > >
> > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > >
> > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > >
> > > > > > > > > > > > > main()
> > > > > > > > > > > > > {
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > >
> > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > >
> > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > >
> > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > >
> > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > >
> > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > >
> > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > >
> > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > >
> > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > >
> > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > >
> > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > >
> > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > >
> > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > >
> > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > >
> > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > }
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8013 From: tmday7 Date: 7/29/2013
Subject: Re: How to setup bits
What version of Mach3 are you running?
Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> /Bengt
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hello Troy,
> >
> > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > >
> > > Hello Bengt,
> > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Kfloppers,
> > > >
> > > > Now I am back again and need some help with homeing G28.1
> > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > >
> > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > >
> > > > Still on 428 and std 1024.set in Mach3
> > > >
> > > > I just cannot get this working so can you guys help out with this.
> > > >
> > > > Cheers from Sweden
> > > > Bengt
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Guys,
> > > > >
> > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >  
> > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > >  
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > >
> > > > > >
> > > > > >  
> > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Bengt,
> > > > > > >  
> > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > >  
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > >
> > > > > > >
> > > > > > >  
> > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > >
> > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > >
> > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > Yes my button is the same
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > >
> > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > >
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > >
> > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > Cheers
> > > > > > > > > > > > Bengt
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Troy
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > {
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > }
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8014 From: Bengt Sjoelund Date: 7/29/2013
Subject: Re: How to setup bits
Still 0.53 I Believe as do not recall that I´ve done any update.

/Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@...> wrote:
>
> What version of Mach3 are you running?
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > /Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hello Troy,
> > >
> > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > >
> > > > Hello Bengt,
> > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Kfloppers,
> > > > >
> > > > > Now I am back again and need some help with homeing G28.1
> > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > >
> > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > >
> > > > > Still on 428 and std 1024.set in Mach3
> > > > >
> > > > > I just cannot get this working so can you guys help out with this.
> > > > >
> > > > > Cheers from Sweden
> > > > > Bengt
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Guys,
> > > > > >
> > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >  
> > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > >  
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > >
> > > > > > >
> > > > > > >  
> > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Bengt,
> > > > > > > >  
> > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > >  
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > >
> > > > > > > >
> > > > > > > >  
> > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > >
> > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > >
> > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > Yes my button is the same
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > >
> > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > >
> > > > > > > > > > > > Troy
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > >
> > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > Bengt
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8015 From: tmday7 Date: 7/29/2013
Subject: Re: How to setup bits
Just tried G28.1 X0 and worked just fine. Did this for all axes and worked fine.
Troy
--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Still 0.53 I Believe as do not recall that I´ve done any update.
>
> /Bengt
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> >
> > What version of Mach3 are you running?
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > > /Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hello Troy,
> > > >
> > > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > > >
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > > >
> > > > > Hello Bengt,
> > > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Kfloppers,
> > > > > >
> > > > > > Now I am back again and need some help with homeing G28.1
> > > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > > >
> > > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > > >
> > > > > > Still on 428 and std 1024.set in Mach3
> > > > > >
> > > > > > I just cannot get this working so can you guys help out with this.
> > > > > >
> > > > > > Cheers from Sweden
> > > > > > Bengt
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Guys,
> > > > > > >
> > > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Troy,
> > > > > > > >  
> > > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > > >  
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > > From: tmday7 <tmday@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > >
> > > > > > > >
> > > > > > > >  
> > > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Bengt,
> > > > > > > > >  
> > > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > > >  
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  
> > > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > >
> > > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > > >
> > > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > > Yes my button is the same
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > > >
> > > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > > >
> > > > > > > > > > > > > Troy
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8016 From: Tom Kerekes Date: 7/29/2013
Subject: Re: How to setup bits
Hi Bengt!

You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.

Have you done this?

Regards
TK

Group: DynoMotion Message: 8017 From: Bengt Sjoelund Date: 7/29/2013
Subject: Re: How to setup bits
Hi Tom,

Correct me if I am wrong but I think you wrote that for me ;)
Please have a look in my files in July 2013 folder where a copy of all files in use are located.

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt!
>
> You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.
>
> Have you done this?
>
> Regards
> TK
>
>
>
> ________________________________
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, July 29, 2013 12:02 PM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>
>  
> Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> /Bengt
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hello Troy,
> >
> > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > >
> > > Hello Bengt,
> > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Kfloppers,
> > > >
> > > > Now I am back again and need some help with homeing G28.1
> > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > >
> > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > >
> > > > Still on 428 and std 1024.set in Mach3
> > > >
> > > > I just cannot get this working so can you guys help out with this.
> > > >
> > > > Cheers from Sweden
> > > > Bengt
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Guys,
> > > > >
> > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >  
> > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > >  
> > > > > > Regards
> > > > > > TK
> > > > > >
> > > > > > From: tmday7 <tmday@>
> > > > > > To: DynoMotion@yahoogroups.com
> > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > >
> > > > > >
> > > > > >  
> > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Bengt,
> > > > > > >  
> > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > >  
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > >
> > > > > > >
> > > > > > >  
> > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > >
> > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > >
> > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > Yes my button is the same
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > >
> > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > >
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > >
> > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > Cheers
> > > > > > > > > > > > Bengt
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > >
> > > > > > > > > > > > > Troy
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > {
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > }
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8018 From: Tom Kerekes Date: 7/29/2013
Subject: Re: How to setup bits
Hi Bengt,

I see a CombiMillMach3Home.c in your folder.  Do you have the Dynomotion Plugin configured to use it?

Regards
TK


Group: DynoMotion Message: 8019 From: Bengt Sjoelund Date: 7/30/2013
Subject: Re: How to setup bits
Hi Tom,

I sure hope so, take a look at the plugin setup.png in folder.

Homeing has been working before 'we' added the Spindle function if I recall the timeline correctly and so it is 'documented' in this thread over a year ago. Due to my health issues I have not had much time in my workshop so this was sent to backlog for more urgent matters to deal with.

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>
> I see a CombiMillMach3Home.c in your folder.  Do you have the Dynomotion Plugin configured to use it?
>
> Regards
> TK
>
>
>
>
> ________________________________
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, July 29, 2013 2:39 PM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>
>  
> Hi Tom,
>
> Correct me if I am wrong but I think you wrote that for me ;)
> Please have a look in my files in July 2013 folder where a copy of all files in use are located.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt!
> >
> > You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.
> >
> > Have you done this?
> >
> > Regards
> > TK
> >
> >
> >
> > ________________________________
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, July 29, 2013 12:02 PM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >
> >  
> > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > /Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hello Troy,
> > >
> > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > >
> > > > Hello Bengt,
> > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Kfloppers,
> > > > >
> > > > > Now I am back again and need some help with homeing G28.1
> > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > >
> > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > >
> > > > > Still on 428 and std 1024.set in Mach3
> > > > >
> > > > > I just cannot get this working so can you guys help out with this.
> > > > >
> > > > > Cheers from Sweden
> > > > > Bengt
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Guys,
> > > > > >
> > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >  
> > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > >  
> > > > > > > Regards
> > > > > > > TK
> > > > > > >
> > > > > > > From: tmday7 <tmday@>
> > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > >
> > > > > > >
> > > > > > >  
> > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Bengt,
> > > > > > > > ÃÆ'‚ 
> > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > > ÃÆ'‚ 
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > >
> > > > > > > >
> > > > > > > > ÃÆ'‚ 
> > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > >
> > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > >
> > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > >
> > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > Yes my button is the same
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > >
> > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > >
> > > > > > > > > > > > Troy
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > >
> > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > Bengt
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8020 From: Bengt Sjoelund Date: 7/30/2013
Subject: Re: How to setup bits
Hi Tom & Kfloppers,

Some progress over here is that the Z index pulse is missing and that behavior put all things to do unwanted movement. Queued axis movemnts starts as soon as any axis is manually moved as the G28.1 command is not fully executed.

Need to edit Z axis and disable search for index pulse. >>>>> shows edit

while (!ReadBit(137)) ; // wait for switch (input #137) to change high

Jog(z,0); // StopMotion

while(!CheckDone(z)) ; // wait until stopped

MoveRel(z,-5*2000); // move 5mm further negative

while(!CheckDone(z)) ; // wait until done moving

Delay_sec(2); // settle out for a while

>>>>> //while(ReadBit(42)) ; // keep moving negative until we see the index pulse

>>>>> //Jog(z,0); // stop

while (!CheckDone(z)) ;

DisableAxis(z);

Zero(z); // Zero the Encoder

EnableAxisDest(z,0.0); // Re-enable the axis and command position zero


Is this correctly done? Have to investigate what is wrong with Index pulse and then when fixed re-edit above back to as it should be.

MDI G28.1 X0 or Y0 works but not G28.1 Z0 or Z0X0Y0 obviously.
Ref all home on first page does not work at all = no axis movement.

Mach3 is .058 and not .053 if that makes any difference.

Cheers
Bengt




--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Tom,
>
> I sure hope so, take a look at the plugin setup.png in folder.
>
> Homeing has been working before 'we' added the Spindle function if I recall the timeline correctly and so it is 'documented' in this thread over a year ago. Due to my health issues I have not had much time in my workshop so this was sent to backlog for more urgent matters to deal with.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >
> > I see a CombiMillMach3Home.c in your folder.  Do you have the Dynomotion Plugin configured to use it?
> >
> > Regards
> > TK
> >
> >
> >
> >
> > ________________________________
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, July 29, 2013 2:39 PM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >
> >  
> > Hi Tom,
> >
> > Correct me if I am wrong but I think you wrote that for me ;)
> > Please have a look in my files in July 2013 folder where a copy of all files in use are located.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt!
> > >
> > > You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.
> > >
> > > Have you done this?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > > ________________________________
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, July 29, 2013 12:02 PM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >
> > >  
> > > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > > /Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hello Troy,
> > > >
> > > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > > >
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > > >
> > > > > Hello Bengt,
> > > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Kfloppers,
> > > > > >
> > > > > > Now I am back again and need some help with homeing G28.1
> > > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > > >
> > > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > > >
> > > > > > Still on 428 and std 1024.set in Mach3
> > > > > >
> > > > > > I just cannot get this working so can you guys help out with this.
> > > > > >
> > > > > > Cheers from Sweden
> > > > > > Bengt
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Guys,
> > > > > > >
> > > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > >
> > > > > > > > Hi Troy,
> > > > > > > >  
> > > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > > >  
> > > > > > > > Regards
> > > > > > > > TK
> > > > > > > >
> > > > > > > > From: tmday7 <tmday@>
> > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > >
> > > > > > > >
> > > > > > > >  
> > > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Bengt,
> > > > > > > > > ÃÆ'‚ 
> > > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > > > ÃÆ'‚ 
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > ÃÆ'‚ 
> > > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > >
> > > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > > >
> > > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > > Yes my button is the same
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > > >
> > > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > > >
> > > > > > > > > > > > > Troy
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8021 From: tmday7 Date: 7/30/2013
Subject: Re: How to setup bits
Ahhh...progress :)

I have a similar problem when i forget to enable my drives. If i try to reference an axis and that drive is disabled, then i have to power cycle KFLOP before i can reference axis correctly.

I would think that your Ref All Button is not working because its sending a signal to ref Z axis, which seems is the issue.
Try removing the DoButton (24) from button VB and see if it works.

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Tom & Kfloppers,
>
> Some progress over here is that the Z index pulse is missing and that behavior put all things to do unwanted movement. Queued axis movemnts starts as soon as any axis is manually moved as the G28.1 command is not fully executed.
>
> Need to edit Z axis and disable search for index pulse. >>>>> shows edit
>
> while (!ReadBit(137)) ; // wait for switch (input #137) to change high
>
> Jog(z,0); // StopMotion
>
> while(!CheckDone(z)) ; // wait until stopped
>
> MoveRel(z,-5*2000); // move 5mm further negative
>
> while(!CheckDone(z)) ; // wait until done moving
>
> Delay_sec(2); // settle out for a while
>
> >>>>> //while(ReadBit(42)) ; // keep moving negative until we see the index pulse
>
> >>>>> //Jog(z,0); // stop
>
> while (!CheckDone(z)) ;
>
> DisableAxis(z);
>
> Zero(z); // Zero the Encoder
>
> EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
>
>
> Is this correctly done? Have to investigate what is wrong with Index pulse and then when fixed re-edit above back to as it should be.
>
> MDI G28.1 X0 or Y0 works but not G28.1 Z0 or Z0X0Y0 obviously.
> Ref all home on first page does not work at all = no axis movement.
>
> Mach3 is .058 and not .053 if that makes any difference.
>
> Cheers
> Bengt
>
>
>
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Tom,
> >
> > I sure hope so, take a look at the plugin setup.png in folder.
> >
> > Homeing has been working before 'we' added the Spindle function if I recall the timeline correctly and so it is 'documented' in this thread over a year ago. Due to my health issues I have not had much time in my workshop so this was sent to backlog for more urgent matters to deal with.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > >
> > > I see a CombiMillMach3Home.c in your folder.  Do you have the Dynomotion Plugin configured to use it?
> > >
> > > Regards
> > > TK
> > >
> > >
> > >
> > >
> > > ________________________________
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, July 29, 2013 2:39 PM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >
> > >  
> > > Hi Tom,
> > >
> > > Correct me if I am wrong but I think you wrote that for me ;)
> > > Please have a look in my files in July 2013 folder where a copy of all files in use are located.
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt!
> > > >
> > > > You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.
> > > >
> > > > Have you done this?
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, July 29, 2013 12:02 PM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > >
> > > >  
> > > > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > > > /Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hello Troy,
> > > > >
> > > > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > > > >
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > > > >
> > > > > > Hello Bengt,
> > > > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Kfloppers,
> > > > > > >
> > > > > > > Now I am back again and need some help with homeing G28.1
> > > > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > > > >
> > > > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > > > >
> > > > > > > Still on 428 and std 1024.set in Mach3
> > > > > > >
> > > > > > > I just cannot get this working so can you guys help out with this.
> > > > > > >
> > > > > > > Cheers from Sweden
> > > > > > > Bengt
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Hi Guys,
> > > > > > > >
> > > > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > > > Cheers
> > > > > > > > Bengt
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Troy,
> > > > > > > > >  
> > > > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > > > >  
> > > > > > > > > Regards
> > > > > > > > > TK
> > > > > > > > >
> > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >  
> > > > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > > > >
> > > > > > > > > Troy
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Bengt,
> > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > > > >
> > > > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > > > >
> > > > > > > > > > > Troy
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > > > Yes my button is the same
> > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8022 From: Bengt Sjoelund Date: 7/30/2013
Subject: Re: How to setup bits
Hi guys,

Now I´m back in business. Edited the Z homeing part, go to switch - stop - move back 5mm - zero axis - enable axis and it works.

Tested to remove DoButton ( 24 ) Before that and X/Y woks OK.
So to get proper functionality to REF ALL HOME button I had to remove DoButton ( 25 ) as this slows down the whole operation very much.

When I can find a time slice I will investigate why there is no Index pulse on Z axis.

Question

Soft limits, are these to be setup in Mach3 or KMotion C-file?
I assume the soft limit values are in relation to machine coordinates?


Next features to be installed are my Renishaw probe and Tool Length measurement. Probe to be set as Tool #0 and working like this - probe part surface - Zero - move to TL probe and measure offset - set T1 into tool table. Next tool goto TL probe and set offset in relation to #0.

Any hints and guides to get this working? Will use 2 separate I/O pins for each Renishaw unit.


Cheers
Bengt






--- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@...> wrote:
>
> Ahhh...progress :)
>
> I have a similar problem when i forget to enable my drives. If i try to reference an axis and that drive is disabled, then i have to power cycle KFLOP before i can reference axis correctly.
>
> I would think that your Ref All Button is not working because its sending a signal to ref Z axis, which seems is the issue.
> Try removing the DoButton (24) from button VB and see if it works.
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Tom & Kfloppers,
> >
> > Some progress over here is that the Z index pulse is missing and that behavior put all things to do unwanted movement. Queued axis movemnts starts as soon as any axis is manually moved as the G28.1 command is not fully executed.
> >
> > Need to edit Z axis and disable search for index pulse. >>>>> shows edit
> >
> > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> >
> > Jog(z,0); // StopMotion
> >
> > while(!CheckDone(z)) ; // wait until stopped
> >
> > MoveRel(z,-5*2000); // move 5mm further negative
> >
> > while(!CheckDone(z)) ; // wait until done moving
> >
> > Delay_sec(2); // settle out for a while
> >
> > >>>>> //while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> >
> > >>>>> //Jog(z,0); // stop
> >
> > while (!CheckDone(z)) ;
> >
> > DisableAxis(z);
> >
> > Zero(z); // Zero the Encoder
> >
> > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> >
> >
> > Is this correctly done? Have to investigate what is wrong with Index pulse and then when fixed re-edit above back to as it should be.
> >
> > MDI G28.1 X0 or Y0 works but not G28.1 Z0 or Z0X0Y0 obviously.
> > Ref all home on first page does not work at all = no axis movement.
> >
> > Mach3 is .058 and not .053 if that makes any difference.
> >
> > Cheers
> > Bengt
> >
> >
> >
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Tom,
> > >
> > > I sure hope so, take a look at the plugin setup.png in folder.
> > >
> > > Homeing has been working before 'we' added the Spindle function if I recall the timeline correctly and so it is 'documented' in this thread over a year ago. Due to my health issues I have not had much time in my workshop so this was sent to backlog for more urgent matters to deal with.
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt,
> > > >
> > > > I see a CombiMillMach3Home.c in your folder.  Do you have the Dynomotion Plugin configured to use it?
> > > >
> > > > Regards
> > > > TK
> > > >
> > > >
> > > >
> > > >
> > > > ________________________________
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Monday, July 29, 2013 2:39 PM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > >
> > > >  
> > > > Hi Tom,
> > > >
> > > > Correct me if I am wrong but I think you wrote that for me ;)
> > > > Please have a look in my files in July 2013 folder where a copy of all files in use are located.
> > > >
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Bengt!
> > > > >
> > > > > You need to create a KFLOP C Program to Home your axes.  Then Configure the Mach3 Dynomotion Plugin to use this program for Homing.
> > > > >
> > > > > Have you done this?
> > > > >
> > > > > Regards
> > > > > TK
> > > > >
> > > > >
> > > > >
> > > > > ________________________________
> > > > > From: Bengt Sjoelund <cnc@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Monday, July 29, 2013 12:02 PM
> > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > >
> > > > >
> > > > >
> > > > >  
> > > > > Hmmm. totally dead as in nothing when trying to home my axis. Operates OK otherwise
> > > > > /Bengt
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hello Troy,
> > > > > >
> > > > > > Nothing happends in MDI with G28.1 command, nothing on first page with REF ALL HOME button = totally dead.
> > > > > >
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday88@> wrote:
> > > > > > >
> > > > > > > Hello Bengt,
> > > > > > > What happens when you execute a G28.1 for an axis? Have not tried a G28.1 on my machine, only the VB that is assigned to button in Mach3.Iam still using Mach3 Version R3.043.022 and Dynomotion Version 4.29.
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Hi Kfloppers,
> > > > > > > >
> > > > > > > > Now I am back again and need some help with homeing G28.1
> > > > > > > > As you can see it has been working a year ago but now it does not. All files I use are in my folder Bengt's CombiMill/July2013/
> > > > > > > >
> > > > > > > > I do belive the reset/init and spinde c-files are new after the homeing was functioning but I have been away from the machine for a longer period so my memory is not clear on this matter. Homeing has not been working for a long time as I have done some milling from time to time but would like to have it functioning again.
> > > > > > > >
> > > > > > > > Still on 428 and std 1024.set in Mach3
> > > > > > > >
> > > > > > > > I just cannot get this working so can you guys help out with this.
> > > > > > > >
> > > > > > > > Cheers from Sweden
> > > > > > > > Bengt
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Guys,
> > > > > > > > >
> > > > > > > > > Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
> > > > > > > > > Cheers
> > > > > > > > > Bengt
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > >
> > > > > > > > > > Hi Troy,
> > > > > > > > > >  
> > > > > > > > > > Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
> > > > > > > > > >  
> > > > > > > > > > Regards
> > > > > > > > > > TK
> > > > > > > > > >
> > > > > > > > > > From: tmday7 <tmday@>
> > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > Sent: Thursday, April 26, 2012 11:33 AM
> > > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > > >
> > > > > > > > > >
> > > > > > > > > >  
> > > > > > > > > > Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
> > > > > > > > > >
> > > > > > > > > > Troy
> > > > > > > > > >
> > > > > > > > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > > > > > > > >
> > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> > > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > > Regards
> > > > > > > > > > > TK
> > > > > > > > > > >
> > > > > > > > > > > From: Bengt Sjoelund <cnc@>
> > > > > > > > > > > To: DynoMotion@yahoogroups.com
> > > > > > > > > > > Sent: Thursday, April 26, 2012 11:00 AM
> > > > > > > > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > > > ÃÆ'‚ 
> > > > > > > > > > > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> > > > > > > > > > >
> > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > >
> > > > > > > > > > > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > > > > > > > > > > >
> > > > > > > > > > > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > > > > > > > > > > >
> > > > > > > > > > > > Troy
> > > > > > > > > > > >
> > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > >
> > > > > > > > > > > > > Sorry, long time no VB editing ;)
> > > > > > > > > > > > > Yes my button is the same
> > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > > > > > > > > > > >
> > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Is the VB code in the Ref All Button correct?
> > > > > > > > > > > > > > > This is the VB that is in mine...
> > > > > > > > > > > > > > > DoButton( 24 )
> > > > > > > > > > > > > > > DoButton( 23 )
> > > > > > > > > > > > > > > DoButton( 22 )
> > > > > > > > > > > > > > > DoButton( 25 )
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > DoOEMButton(133)
> > > > > > > > > > > > > > > DoOEMButton(134)
> > > > > > > > > > > > > > > DoOEMButton(135)
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > Hi Troy,
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > > > > > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Hi Bengt,
> > > > > > > > > > > > > > > > > Hope iam not intruding here.
> > > > > > > > > > > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > Troy
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Hi Tom,
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > > > > > > > > > > Cheers
> > > > > > > > > > > > > > > > > > Bengt
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > #include "KMotionDef.h"
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > main()
> > > > > > > > > > > > > > > > > > {
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > // Home the X-axis
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > #define X 0
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(X);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(X,0); // stop
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(X);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > // Home the Y-axis
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > #define y 1
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(y);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(y,0); // stop
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(y);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > // Home the Z-axis
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > #define z 2
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(z);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Jog(z,0); // stop
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > DisableAxis(z);
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > > > }
> > > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > > >
> > > > > > > > > > > > > > >
> > > > > > > > > > > > > >
> > > > > > > > > > > > >
> > > > > > > > > > > >
> > > > > > > > > > >
> > > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 8024 From: Tom Kerekes Date: 7/30/2013
Subject: Re: How to setup bits
Hi Bengt,

Soft limits are set in KMotion in machine coordinates and in counts or steps.

The basic G31 probe program needs a C Code added to the Notify C Program to stop when your sensor triggers.  To do the multiple steps you describe and change the tool table will require some Mach3 Basic Macro.

HTH
Regards
TK 

Group: DynoMotion Message: 4554 From: Bengt Sjoelund Date: 4/15/2012
Subject: How to setup bits
Hi,
How do I setup bit's in HomeMach3.c?
bit 136 = Limit - for all 3 axis (machine is prewired to have this configuration with all 3 axis connected to one pin)
bit 137 = Home for all 3 axis
bit 138 = Limit + for all 3 axis
Want to have Z homeing first.
----
#include "KMotionDef.h"
//Plugin calls for Mach3 Home (actually Purge) Commands
main()
{
int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...

printf("Mach3 Home Call, flags = %d\n",flags);

if (flags==1)
{
bit137 // do z homing here
}

if (flags==2)
{
bit137 // do x homing here
}

if (flags==4)
{
bit137 // do y homing here
}


printf("Done\n");
}
-----

I assume above is the way to write bit's

How do I set the axis order for homeing?

Cheers
Bengt
Group: DynoMotion Message: 4555 From: tmday7 Date: 4/15/2012
Subject: Re: How to setup bits
Hello Bengt,
Here is what i use to Reference each axis in Mach3. There is a button for each axis.

#include "KMotionDef.h"

//Plugin calls for Mach3 Home (actually Purge) Commands
//Called from Mach3 "REF" command
//in this case just Zero the measured position (encoder)
//and set the commanded destination to zero

#define X 0
#define Y 1
#define Z 2

main()
{
int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...

printf("Mach3 Home Call, flags = %d\n",flags);

if (flags & 1)
{
ch0->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);

Jog(X,-10000); // start moving
while (ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;

Jog(X,3000); // start moving
while (!ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;
Delay_sec(.25);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
Jog(X,3000);
Move(X,105000);

while(!CheckDone(X)) ;
Delay_sec(.5);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
ch0->LimitSwitchOptions=0x606000f;
}
if (flags & 2)
{
ch1->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);

Jog(Y,10000); // start moving
while (ReadBit(7)) ; // wait for switch (input #7) to change
Jog(Y,0); // StopMotion

while(!CheckDone(Y)) ;

Jog(Y,-3000); // start moving
while (!ReadBit(7)) ; // wait for switch (input #7) to change
Jog(Y,0); // StopMotion

while(!CheckDone(Y)) ;
Delay_sec(.25);

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);
Jog(Y,-3000);
Move(Y,-500);

while(!CheckDone(Y)) ;
Delay_sec(.5);

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);
ch1->LimitSwitchOptions=0x707000f;
}
if (flags & 4)
{
ch2->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);

Jog(Z,10000); // start moving
while (ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;

Jog(Z,-3000); // start moving
while (!ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
Jog(Z,-3000);
Move(Z,-500);

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
ch2->LimitSwitchOptions=0xf0f000f;
}
}


Also here is what i use in KmotionCNC. This C program Reference X axis only.

#include "KMotionDef.h"

//Home all 3 axes

#define X 0
#define Y 1
#define Z 2

main()
{

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);

Jog(X,-10000); // start moving
while (ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;

Jog(X,3000); // start moving
while (!ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;
Delay_sec(.25);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
Jog(X,3000);
Move(X,105000);

while(!CheckDone(X)) ;
Delay_sec(.5);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
ch0->LimitSwitchOptions=0x606000f;



}

Hope this might help,
Troy



--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi,
> How do I setup bit's in HomeMach3.c?
> bit 136 = Limit - for all 3 axis (machine is prewired to have this configuration with all 3 axis connected to one pin)
> bit 137 = Home for all 3 axis
> bit 138 = Limit + for all 3 axis
> Want to have Z homeing first.
> ----
> #include "KMotionDef.h"
> //Plugin calls for Mach3 Home (actually Purge) Commands
> main()
> {
> int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
>
> printf("Mach3 Home Call, flags = %d\n",flags);
>
> if (flags==1)
> {
> bit137 // do z homing here
> }
>
> if (flags==2)
> {
> bit137 // do x homing here
> }
>
> if (flags==4)
> {
> bit137 // do y homing here
> }
>
>
> printf("Done\n");
> }
> -----
>
> I assume above is the way to write bit's
>
> How do I set the axis order for homeing?
>
> Cheers
> Bengt
>
Group: DynoMotion Message: 4556 From: Bengt Sjoelund Date: 4/15/2012
Subject: Re: How to setup bits
Hi Troy,
That is a lot of code, no way to do it simpler? ;)
So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
Cheers
Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Hello Bengt,
> Here is what i use to Reference each axis in Mach3. There is a button for each axis.
>
> #include "KMotionDef.h"
>
> //Plugin calls for Mach3 Home (actually Purge) Commands
> //Called from Mach3 "REF" command
> //in this case just Zero the measured position (encoder)
> //and set the commanded destination to zero
>
> #define X 0
> #define Y 1
> #define Z 2
>
> main()
> {
> int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
>
> printf("Mach3 Home Call, flags = %d\n",flags);
>
> if (flags & 1)
> {
> ch0->LimitSwitchOptions=0x00000000; // disable limits
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
>
> Jog(X,-10000); // start moving
> while (ReadBit(6)) ; // wait for switch (input #6) to change
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ;
>
> Jog(X,3000); // start moving
> while (!ReadBit(6)) ; // wait for switch (input #6) to change
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ;
> Delay_sec(.25);
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
> Jog(X,3000);
> Move(X,105000);
>
> while(!CheckDone(X)) ;
> Delay_sec(.5);
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
> ch0->LimitSwitchOptions=0x606000f;
> }
> if (flags & 2)
> {
> ch1->LimitSwitchOptions=0x00000000; // disable limits
>
> DisableAxis(Y);
> Zero(Y);
> EnableAxisDest(Y,0.0);
>
> Jog(Y,10000); // start moving
> while (ReadBit(7)) ; // wait for switch (input #7) to change
> Jog(Y,0); // StopMotion
>
> while(!CheckDone(Y)) ;
>
> Jog(Y,-3000); // start moving
> while (!ReadBit(7)) ; // wait for switch (input #7) to change
> Jog(Y,0); // StopMotion
>
> while(!CheckDone(Y)) ;
> Delay_sec(.25);
>
> DisableAxis(Y);
> Zero(Y);
> EnableAxisDest(Y,0.0);
> Jog(Y,-3000);
> Move(Y,-500);
>
> while(!CheckDone(Y)) ;
> Delay_sec(.5);
>
> DisableAxis(Y);
> Zero(Y);
> EnableAxisDest(Y,0.0);
> ch1->LimitSwitchOptions=0x707000f;
> }
> if (flags & 4)
> {
> ch2->LimitSwitchOptions=0x00000000; // disable limits
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
>
> Jog(Z,10000); // start moving
> while (ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
>
> Jog(Z,-3000); // start moving
> while (!ReadBit(15)) ; // wait for switch (input #15) to change
> Jog(Z,0); // StopMotion
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> Jog(Z,-3000);
> Move(Z,-500);
>
> while(!CheckDone(Z)) ;
> Delay_sec(.25);
>
> DisableAxis(Z);
> Zero(Z);
> EnableAxisDest(Z,0.0);
> ch2->LimitSwitchOptions=0xf0f000f;
> }
> }
>
>
> Also here is what i use in KmotionCNC. This C program Reference X axis only.
>
> #include "KMotionDef.h"
>
> //Home all 3 axes
>
> #define X 0
> #define Y 1
> #define Z 2
>
> main()
> {
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
>
> Jog(X,-10000); // start moving
> while (ReadBit(6)) ; // wait for switch (input #6) to change
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ;
>
> Jog(X,3000); // start moving
> while (!ReadBit(6)) ; // wait for switch (input #6) to change
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ;
> Delay_sec(.25);
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
> Jog(X,3000);
> Move(X,105000);
>
> while(!CheckDone(X)) ;
> Delay_sec(.5);
>
> DisableAxis(X);
> Zero(X);
> EnableAxisDest(X,0.0);
> ch0->LimitSwitchOptions=0x606000f;
>
>
>
> }
>
> Hope this might help,
> Troy
>
>
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi,
> > How do I setup bit's in HomeMach3.c?
> > bit 136 = Limit - for all 3 axis (machine is prewired to have this configuration with all 3 axis connected to one pin)
> > bit 137 = Home for all 3 axis
> > bit 138 = Limit + for all 3 axis
> > Want to have Z homeing first.
> > ----
> > #include "KMotionDef.h"
> > //Plugin calls for Mach3 Home (actually Purge) Commands
> > main()
> > {
> > int flags = persist.UserData[5]; // Mach3 flags bit0=X, bit1=Y, Bit2=Z, etc...
> >
> > printf("Mach3 Home Call, flags = %d\n",flags);
> >
> > if (flags==1)
> > {
> > bit137 // do z homing here
> > }
> >
> > if (flags==2)
> > {
> > bit137 // do x homing here
> > }
> >
> > if (flags==4)
> > {
> > bit137 // do y homing here
> > }
> >
> >
> > printf("Done\n");
> > }
> > -----
> >
> > I assume above is the way to write bit's
> >
> > How do I set the axis order for homeing?
> >
> > Cheers
> > Bengt
> >
>
Group: DynoMotion Message: 4557 From: tmday7 Date: 4/15/2012
Subject: Re: How to setup bits
Ya, iam still trying to grasp the codeing myself. :) All this coding was done by Tom from Dynomotion.
Doing each axis separate was my preference. You can make one button do all 3 axis starting with Z axis.

Here is the code i use in KmotionCNC that uses one button to Reference all 3 axes starting with Z axis. One thing with my setup is i have 3 switches , one on each axis, that acts as the Reference and limit switch. All 3 switches have there own input on my Breakout Board.

#include "KMotionDef.h"

//Home all 3 axes

#define X 0
#define Y 1
#define Z 2

main()
{
ch2->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);

Jog(Z,10000); // start moving
while (ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;

Jog(Z,-3000); // start moving
while (!ReadBit(15)) ; // wait for switch (input #15) to change
Jog(Z,0); // StopMotion

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
Jog(Z,-3000);
Move(Z,-500);

while(!CheckDone(Z)) ;
Delay_sec(.25);

DisableAxis(Z);
Zero(Z);
EnableAxisDest(Z,0.0);
ch2->LimitSwitchOptions=0xf0f000f;

ch0->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);

Jog(X,-10000); // start moving
while (ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;

Jog(X,3000); // start moving
while (!ReadBit(6)) ; // wait for switch (input #6) to change
Jog(X,0); // StopMotion

while(!CheckDone(X)) ;
Delay_sec(.25);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
Jog(X,3000);
Move(X,105000);

while(!CheckDone(X)) ;
Delay_sec(.5);

DisableAxis(X);
Zero(X);
EnableAxisDest(X,0.0);
ch0->LimitSwitchOptions=0x606000f;


ch1->LimitSwitchOptions=0x00000000; // disable limits

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);

Jog(Y,10000); // start moving
while (ReadBit(7)) ; // wait for switch (input #7) to change
Jog(Y,0); // StopMotion

while(!CheckDone(Y)) ;

Jog(Y,-3000); // start moving
while (!ReadBit(7)) ; // wait for switch (input #7) to change
Jog(Y,0); // StopMotion

while(!CheckDone(Y)) ;
Delay_sec(.25);

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);
Jog(Y,-3000);
Move(Y,-500);

while(!CheckDone(Y)) ;
Delay_sec(.5);

DisableAxis(Y);
Zero(Y);
EnableAxisDest(Y,0.0);
ch1->LimitSwitchOptions=0x707000f;
}

HTH,
Troy


--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Troy,
> That is a lot of code, no way to do it simpler? ;)
> So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> Cheers
> Bengt
>
Group: DynoMotion Message: 4558 From: tmday7 Date: 4/15/2012
Subject: Re: How to setup bits
When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Troy,
> That is a lot of code, no way to do it simpler? ;)
> So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> Cheers
> Bengt
>
Group: DynoMotion Message: 4559 From: Bengt Sjoelund Date: 4/15/2012
Subject: Re: How to setup bits
Hi Troy,
I am expecting axes to move to switches and Reference.

Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.

This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Troy,
> > That is a lot of code, no way to do it simpler? ;)
> > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > Cheers
> > Bengt
> >
>
Group: DynoMotion Message: 4560 From: tmday7 Date: 4/15/2012
Subject: Re: How to setup bits
Ok. Then we are on the same page. :)

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Troy,
> I am expecting axes to move to switches and Reference.
>
> Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
>
> This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Troy,
> > > That is a lot of code, no way to do it simpler? ;)
> > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > Cheers
> > > Bengt
> > >
> >
>
Group: DynoMotion Message: 4561 From: Tom Kerekes Date: 4/15/2012
Subject: Re: How to setup bits
Hi Bengt,
 
The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
 
Yes I know setting up homing is hard but it isn't that hard :}
 
Troy's program has ~24 lines of C per axis.  Where each line is in logical sequence and very simple.  In general the program must define:
 
#1 - the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
 
#2 - which axis to home
 
#3 - Direction to home
 
#4 - Initial Fast Speed
 
#5 - Slow speed
 
#6 - what Input to use for home
 
#7 - Input polarity
 
#8 - How far to move inside switch
 
#9 - any neccessary delays and where to put them
 
 
So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
 
Answer the above questions for each axis in your system and I will modify the Home Program for you.
  
 
Regards
TK
 
 
 
Group: DynoMotion Message: 4562 From: Bengt Sjoelund Date: 4/15/2012
Subject: Re: How to setup bits
Hi Tom,

#1 Have separate home switches = BIT137 for XYZ
#2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
#3 Towards - (minus)
#4 500mm?
#5 50mm?
#6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
#7 NC
#8 <5mm
#9 After each axis is 'homed' 2s delay

Cheers
Bengt


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
>  
> Yes I know setting up homing is hard but it isn't that hard :}
>  
> Troy's program has ~24 lines of C per axis.  Where each line is in logical sequence and very simple.  In general the program must define:
>  
> #1 - the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
>  
> #2 - which axis to home
>  
> #3 - Direction to home
>  
> #4 - Initial Fast Speed
>  
> #5 - Slow speed
>  
> #6 - what Input to use for home
>  
> #7 - Input polarity
>  
> #8 - How far to move inside switch
>  
> #9 - any neccessary delays and where to put them
>  
>  
> So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
>  
> Answer the above questions for each axis in your system and I will modify the Home Program for you.
>   
>  
> Regards
> TK
>  
>  
>  
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, April 15, 2012 8:09 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Troy,
> I am expecting axes to move to switches and Reference.
>
> Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
>
> This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Troy,
> > > That is a lot of code, no way to do it simpler? ;)
> > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > Cheers
> > > Bengt
> > >
> >
>
Group: DynoMotion Message: 4563 From: Tom Kerekes Date: 4/15/2012
Subject: Re: How to setup bits
Hi Bengt,
 
KFLOP C Programs work in counts or microsteps (not mm).  What is the resolution of your axes?
 
Regards
TK

Group: DynoMotion Message: 4567 From: Bengt Sjoelund Date: 4/16/2012
Subject: Re: How to setup bits
Hi Tom,

Mach3 motor setup X/Y/Z is 2000/2000/4000.
My init file in my folder combimill 3axis.c

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> KFLOP C Programs work in counts or microsteps (not mm).  What is the resolution of your axes?
>  
> Regards
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, April 15, 2012 11:48 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Tom,
>
> #1 Have separate home switches = BIT137 for XYZ
> #2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
> #3 Towards - (minus)
> #4 500mm?
> #5 50mm?
> #6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
> #7 NC
> #8 <5mm
> #9 After each axis is 'homed' 2s delay
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
> >  
> > Yes I know setting up homing is hard but it isn't that hard :}
> >  
> > Troy's program has ~24 lines of C per axis.  Where each line is in logical sequence and very simple.  In general the program must define:
> >  
> > #1 - the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
> >  
> > #2 - which axis to home
> >  
> > #3 - Direction to home
> >  
> > #4 - Initial Fast Speed
> >  
> > #5 - Slow speed
> >  
> > #6 - what Input to use for home
> >  
> > #7 - Input polarity
> >  
> > #8 - How far to move inside switch
> >  
> > #9 - any neccessary delays and where to put them
> >  
> >  
> > So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
> >  
> > Answer the above questions for each axis in your system and I will modify the Home Program for you.
> >   
> >  
> > Regards
> > TK
> >  
> >  
> >  
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, April 15, 2012 8:09 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hi Troy,
> > I am expecting axes to move to switches and Reference.
> >
> > Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
> >
> > This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Troy,
> > > > That is a lot of code, no way to do it simpler? ;)
> > > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > > Cheers
> > > > Bengt
> > > >
> > >
> >
>
Group: DynoMotion Message: 4568 From: Bengt Sjoelund Date: 4/16/2012
Subject: Re: How to setup bits
Hi Tom,
Mach3 motorsetup X/Y/Z is 2000/2000/4000
combimill 3axis.c is in my folder
Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> KFLOP C Programs work in counts or microsteps (not mm).  What is the resolution of your axes?
>  
> Regards
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Sunday, April 15, 2012 11:48 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Tom,
>
> #1 Have separate home switches = BIT137 for XYZ
> #2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
> #3 Towards - (minus)
> #4 500mm?
> #5 50mm?
> #6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
> #7 NC
> #8 <5mm
> #9 After each axis is 'homed' 2s delay
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
> >  
> > Yes I know setting up homing is hard but it isn't that hard :}
> >  
> > Troy's program has ~24 lines of C per axis.  Where each line is in logical sequence and very simple.  In general the program must define:
> >  
> > #1 - the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
> >  
> > #2 - which axis to home
> >  
> > #3 - Direction to home
> >  
> > #4 - Initial Fast Speed
> >  
> > #5 - Slow speed
> >  
> > #6 - what Input to use for home
> >  
> > #7 - Input polarity
> >  
> > #8 - How far to move inside switch
> >  
> > #9 - any neccessary delays and where to put them
> >  
> >  
> > So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
> >  
> > Answer the above questions for each axis in your system and I will modify the Home Program for you.
> >   
> >  
> > Regards
> > TK
> >  
> >  
> >  
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, April 15, 2012 8:09 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hi Troy,
> > I am expecting axes to move to switches and Reference.
> >
> > Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
> >
> > This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Troy,
> > > > That is a lot of code, no way to do it simpler? ;)
> > > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > > Cheers
> > > > Bengt
> > > >
> > >
> >
>
Group: DynoMotion Message: 4571 From: Tom Kerekes Date: 4/17/2012
Subject: Re: How to setup bits
Hi Bengt,
 
Knowing that your Home switch is NC doesn't really tell me the polarity of the input as it could be wired such that "closed" could pull the signal high or low.  I'm assuming the switch pulls the signal low so the signal will go high when the axis hits the home switch.
 
So the C code to home your X axis might be:
 
#include "KMotionDef.h"
 
main()
{
      // Home the axis
      #define X 0
      DisableAxis(X);
      Zero(X);
      EnableAxisDest(X,0.0);
 
      Jog(X,-15000);                // start moving negative
      while (ReadBit(137)) ; // wait for switch (input #137) to change low
      Jog(X,0);                     // StopMotion
 
      while(!CheckDone(X)) ;
 
      Jog(X,1500);                  // start moving positive slower
      while (!ReadBit(137)) ; // wait for switch (input #137) to change high
 
      Jog(X,0); // StopMotion
      while(!CheckDone(X)) ;  // wait until stopped
 
      MoveRel(X,50*2000);     // move 50mm further positive
 
      while(!CheckDone(X)) ;  // wait until done moving
      Delay_sec(2);           // settle out for a while
 
      DisableAxis(X);
      Zero(X);                // Zero the Encoder
      EnableAxisDest(X,0.0);  // Re-enable the axis and command position zero
}
 
First try runnig the program from the C Programs screen to verify it works properly and homes your X axis.  Then cut/paste the C code into the Mach3Home.c program where it says "Home the X axis"
 
Regards
TK
 
 
Group: DynoMotion Message: 4573 From: Bengt Sjoelund Date: 4/17/2012
Subject: Re: How to setup bits
Hi Tom,

Sorry for not being so clear (trying hard with my swinglish ;) )

How do I use the Z+ signal from motor encoder? To get more detailed home position.

MoveRel(X,50*2000); // move 50mm further positive

?? IO40

while(!CheckDone(X)) ; // wait until done moving
Delay_sec(2); // settle out for a while

Thanks for writing the C code with explanations, cleras things up for me. As usual all help is really appreciated and excelent support!

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> Knowing that your Home switch is NC doesn't really tell me the polarity of the input as it could be wired such that "closed" could pull the signal high or low.  I'm assuming the switch pulls the signal low so the signal will go high when the axis hits the home switch.
>  
> So the C code to home your X axis might be:
>  #include"KMotionDef.h"
>  
> main()
> {
>       // Home the axis
>       #define X 0
>       DisableAxis(X);
>       Zero(X);
>       EnableAxisDest(X,0.0);
>  
>       Jog(X,-15000);                // start moving negative
>       while (ReadBit(137)) ; // wait for switch (input #137) to change low
>       Jog(X,0);                     // StopMotion
>  
>       while(!CheckDone(X)) ;
>  
>       Jog(X,1500);                  // start moving positive slower
>       while (!ReadBit(137)) ; // wait for switch (input #137) to change high
>  
>       Jog(X,0); // StopMotion
>       while(!CheckDone(X)) ;  // wait until stopped
>  
>       MoveRel(X,50*2000);     // move 50mm further positive
>  
>       while(!CheckDone(X)) ;  // wait until done moving
>       Delay_sec(2);           // settle out for a while
>  
>       DisableAxis(X);
>       Zero(X);                // Zero the Encoder
>       EnableAxisDest(X,0.0);  // Re-enable the axis and command position zero
> }
>  
> First try runnig the program from the C Programs screen to verify it works properly and homes your X axis.  Then cut/paste the C code into the Mach3Home.c program where it says "Home the X axis"
>  
> Regards
> TK
>  
>  
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Monday, April 16, 2012 5:08 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Tom,
>
> Mach3 motor setup X/Y/Z is 2000/2000/4000.
> My init file in my folder combimill 3axis.c
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > KFLOP C Programs work in counts or microsteps (not mm).  What is the resolution of your axes?
> >  
> > Regards
> > TK
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Sunday, April 15, 2012 11:48 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hi Tom,
> >
> > #1 Have separate home switches = BIT137 for XYZ
> > #2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
> > #3 Towards - (minus)
> > #4 500mm?
> > #5 50mm?
> > #6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
> > #7 NC
> > #8 <5mm
> > #9 After each axis is 'homed' 2s delay
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > >  
> > > The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
> > >  
> > > Yes I know setting up homing is hard but it isn't that hard :}
> > >  
> > > Troy's program has ~24 lines of C per axis.  Where each line is in logical sequence and very simple.  In general the program must define:
> > >  
> > > #1 - the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
> > >  
> > > #2 - which axis to home
> > >  
> > > #3 - Direction to home
> > >  
> > > #4 - Initial Fast Speed
> > >  
> > > #5 - Slow speed
> > >  
> > > #6 - what Input to use for home
> > >  
> > > #7 - Input polarity
> > >  
> > > #8 - How far to move inside switch
> > >  
> > > #9 - any neccessary delays and where to put them
> > >  
> > >  
> > > So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
> > >  
> > > Answer the above questions for each axis in your system and I will modify the Home Program for you.
> > >   
> > >  
> > > Regards
> > > TK
> > >  
> > >  
> > >  
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Sunday, April 15, 2012 8:09 AM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >  
> > > Hi Troy,
> > > I am expecting axes to move to switches and Reference.
> > >
> > > Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
> > >
> > > This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > >
> > > > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Troy,
> > > > > That is a lot of code, no way to do it simpler? ;)
> > > > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4574 From: Tom Kerekes Date: 4/17/2012
Subject: Re: How to setup bits
Hi Bengt,
 
I would replace the "move 50mm further positive" code with Code that "jogs until it sees the Index pulse".  Also after it sees the home switch go away there is no reason to stop, just keep going until the Index is observed.  There is a small risk that the Index pulse will happen to occur almost exactly where the Home switch happens.  In this case there can be a problem that sometimes the Index will be detected immediately and sometimes on the next revolution.  If this is a problem move the limit switch slightly.
 
So replace:
 
    Jog(X,0); // StopMotion
    while(!CheckDone(X)) ;Â // wait until stopped
    MoveRel(X,50*2000); // move 50mm further positive
 
with
 
    while(!ReadBit(40)) ; // keep moving positive until we see the index pulse
    Jog(X,0);                 // stop
 
 
Regards
TK
 
Group: DynoMotion Message: 4637 From: Bengt Sjoelund Date: 4/24/2012
Subject: Re: How to setup bits
Hi Tom,

Good and bad news, the code with 50mm back off works OK in Kmotion as well as Mach3. Decided to try encoder Index and that works but in Mach3 it is not backing off enough, so I decided to go back with 50mm backoff. But now I cannot get that code to work, the encoder Index is sticky. What can I do to get rid of that?
Tried to copy the code into Mach3Home.c and it will not work at all in Kmotion neither Mach3.

Cheers
Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> I would replace the "move 50mm further positive" code with Code that "jogs until it sees the Index pulse".  Also after it sees the home switch go away there is no reason to stop, just keep going until the Index is observed.  There is a small risk that the Index pulse will happen to occur almost exactly where the Home switch happens.  In this case there can be a problem that sometimes the Index will be detected immediately and sometimes on the next revolution.  If this is a problem move the limit switch slightly.
>  
> So replace:
>  
>     Jog(X,0); // StopMotion
>     while(!CheckDone(X)) ;Â // wait until stopped
>     MoveRel(X,50*2000); // move 50mm further positive
>  
> with
>  
>     while(!ReadBit(40)) ; // keep moving positive until we see the index pulse
>     Jog(X,0);                 // stop
>  
>  
> Regards
> TK
>  
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, April 17, 2012 2:37 PM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Tom,
>
> Sorry for not being so clear (trying hard with my swinglish ;) )
>
> How do I use the Z+ signal from motor encoder? To get more detailed home position.
>
> MoveRel(X,50*2000); // move 50mm further positive
>
> ?? IO40
>
> while(!CheckDone(X)) ; // wait until done moving
> Delay_sec(2); // settle out for a while
>
> Thanks for writing the C code with explanations, cleras things up for me. As usual all help is really appreciated and excelent support!
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > Knowing that your Home switch is NC doesn't really tell me the polarity of the input as it could be wired such that "closed" could pull the signal high or low.  I'm assuming the switch pulls the signal low so the signal will go high when the axis hits the home switch.
> >  
> > So the C code to home your X axis might be:
> >  #include"KMotionDef.h"
> >  
> > main()
> > {
> >       // Home the axis
> >       #define X 0
> >       DisableAxis(X);
> >       Zero(X);
> >       EnableAxisDest(X,0.0);
> >  
> >       Jog(X,-15000);                // start moving negative
> >       while (ReadBit(137)) ; // wait for switch (input #137) to change low
> >       Jog(X,0);                     // StopMotion
> >  
> >       while(!CheckDone(X)) ;
> >  
> >       Jog(X,1500);                  // start moving positive slower
> >       while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> >  
> >       Jog(X,0); // StopMotion
> >       while(!CheckDone(X)) ;  // wait until stopped
> >  
> >       MoveRel(X,50*2000);     // move 50mm further positive
> >  
> >       while(!CheckDone(X)) ;  // wait until done moving
> >       Delay_sec(2);           // settle out for a while
> >  
> >       DisableAxis(X);
> >       Zero(X);                // Zero the Encoder
> >       EnableAxisDest(X,0.0);  // Re-enable the axis and command position zero
> > }
> >  
> > First try runnig the program from the C Programs screen to verify it works properly and homes your X axis.  Then cut/paste the C code into the Mach3Home.c program where it says "Home the X axis"
> >  
> > Regards
> > TK
> >  
> >  
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Monday, April 16, 2012 5:08 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hi Tom,
> >
> > Mach3 motor setup X/Y/Z is 2000/2000/4000.
> > My init file in my folder combimill 3axis.c
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > >  
> > > KFLOP C Programs work in counts or microsteps (not mm).  What is the resolution of your axes?
> > >  
> > > Regards
> > > TK
> > >
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Sunday, April 15, 2012 11:48 AM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >  
> > > Hi Tom,
> > >
> > > #1 Have separate home switches = BIT137 for XYZ
> > > #2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
> > > #3 Towards - (minus)
> > > #4 500mm?
> > > #5 50mm?
> > > #6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
> > > #7 NC
> > > #8 <5mm
> > > #9 After each axis is 'homed' 2s delay
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt,
> > > > ÃÆ'‚ 
> > > > The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
> > > > ÃÆ'‚ 
> > > > Yes I know setting up homing is hard but it isn't that hard :}
> > > > ÃÆ'‚ 
> > > > Troy's program has ~24 lines of C per axis.ÃÆ'‚  Where each line is in logical sequence and very simple.ÃÆ'‚  In general the program must define:
> > > > ÃÆ'‚ 
> > > > #1 -ÃÆ'‚ the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
> > > > ÃÆ'‚ 
> > > > #2 -ÃÆ'‚ which axis to home
> > > > ÃÆ'‚ 
> > > > #3 - Direction to home
> > > > ÃÆ'‚ 
> > > > #4 - Initial Fast Speed
> > > > ÃÆ'‚ 
> > > > #5 - Slow speed
> > > > ÃÆ'‚ 
> > > > #6 - what Input to use for home
> > > > ÃÆ'‚ 
> > > > #7 - Input polarity
> > > > ÃÆ'‚ 
> > > > #8 - How far to move inside switch
> > > > ÃÆ'‚ 
> > > > #9 - any neccessary delays and where to put them
> > > > ÃÆ'‚ 
> > > > ÃÆ'‚ 
> > > > So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
> > > > ÃÆ'‚ 
> > > > Answer the above questions for each axis in your system and I will modify the Home Program for you.
> > > > ÃÆ'‚ ÃÆ'‚ 
> > > > ÃÆ'‚ 
> > > > Regards
> > > > TK
> > > > ÃÆ'‚ 
> > > > ÃÆ'‚ 
> > > > ÃÆ'‚ 
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Sunday, April 15, 2012 8:09 AM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > > ÃÆ'‚ 
> > > > Hi Troy,
> > > > I am expecting axes to move to switches and Reference.
> > > >
> > > > Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
> > > >
> > > > This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
> > > >
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > >
> > > > > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > > That is a lot of code, no way to do it simpler? ;)
> > > > > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4638 From: Tom Kerekes Date: 4/24/2012
Subject: Re: How to setup bits
Hi Bengt,
 
Well if the 50mm code worked before and now it doesn't most likely something changed.  If you post the code we can look at it.
 
I don't know what you mean by "sticky".  The Index pulse should be a narrow pulse that only occurs at one spot.  How do you have it wired?
 
You should debug everything in KMotion.exe C Programs Screen first.  Then after it is working merge the code into the Mach3Home.c
 
Regards
TK

Group: DynoMotion Message: 4639 From: Bengt Sjoelund Date: 4/24/2012
Subject: Re: How to setup bits
Hi Tom,
Did debug all OK. Sticky =I Can not change whatever I writer in C filé. Will have
a go tomorrow and report. Writing from my Androidmobile
Cheers Bengt

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> Well if the 50mm code worked before and now it doesn't most likely something changed.  If you post the code we can look at it.
>  
> I don't know what you mean by "sticky".  The Index pulse should be a narrow pulse that only occurs at one spot.  How do you have it wired?
>  
> You should debug everything in KMotion.exe C Programs Screen first.  Then after it is working merge the code into the Mach3Home.c
>  
> Regards
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Tuesday, April 24, 2012 11:00 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hi Tom,
>
> Good and bad news, the code with 50mm back off works OK in Kmotion as well as Mach3. Decided to try encoder Index and that works but in Mach3 it is not backing off enough, so I decided to go back with 50mm backoff. But now I cannot get that code to work, the encoder Index is sticky. What can I do to get rid of that?
> Tried to copy the code into Mach3Home.c and it will not work at all in Kmotion neither Mach3.
>
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > I would replace the "move 50mm further positive" code with Code that "jogs until it sees the Index pulse".  Also after it sees the home switch go away there is no reason to stop, just keep going until the Index is observed.  There is a small risk that the Index pulse will happen to occur almost exactly where the Home switch happens.  In this case there can be a problem that sometimes the Index will be detected immediately and sometimes on the next revolution.  If this is a problem move the limit switch slightly.
> >  
> > So replace:
> >  
> >     Jog(X,0); // StopMotion
> >     while(!CheckDone(X)) ;Â // wait until stopped
> >     MoveRel(X,50*2000); // move 50mm further positive
> >  
> > with
> >  
> >     while(!ReadBit(40)) ; // keep moving positive until we see the index pulse
> >     Jog(X,0);                 // stop
> >  
> >  
> > Regards
> > TK
> >  
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Tuesday, April 17, 2012 2:37 PM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > Hi Tom,
> >
> > Sorry for not being so clear (trying hard with my swinglish ;) )
> >
> > How do I use the Z+ signal from motor encoder? To get more detailed home position.
> >
> > MoveRel(X,50*2000); // move 50mm further positive
> >
> > ?? IO40
> >
> > while(!CheckDone(X)) ; // wait until done moving
> > Delay_sec(2); // settle out for a while
> >
> > Thanks for writing the C code with explanations, cleras things up for me. As usual all help is really appreciated and excelent support!
> >
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > >
> > > Hi Bengt,
> > >  
> > > Knowing that your Home switch is NC doesn't really tell me the polarity of the input as it could be wired such that "closed" could pull the signal high or low.  I'm assuming the switch pulls the signal low so the signal will go high when the axis hits the home switch.
> > >  
> > > So the C code to home your X axis might be:
> > >  #include"KMotionDef.h"
> > >  
> > > main()
> > > {
> > >       // Home the axis
> > >       #define X 0
> > >       DisableAxis(X);
> > >       Zero(X);
> > >       EnableAxisDest(X,0.0);
> > >  
> > >       Jog(X,-15000);                // start moving negative
> > >       while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > >       Jog(X,0);                     // StopMotion
> > >  
> > >       while(!CheckDone(X)) ;
> > >  
> > >       Jog(X,1500);                  // start moving positive slower
> > >       while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > >  
> > >       Jog(X,0); // StopMotion
> > >       while(!CheckDone(X)) ;  // wait until stopped
> > >  
> > >       MoveRel(X,50*2000);     // move 50mm further positive
> > >  
> > >       while(!CheckDone(X)) ;  // wait until done moving
> > >       Delay_sec(2);           // settle out for a while
> > >  
> > >       DisableAxis(X);
> > >       Zero(X);                // Zero the Encoder
> > >       EnableAxisDest(X,0.0);  // Re-enable the axis and command position zero
> > > }
> > >  
> > > First try runnig the program from the C Programs screen to verify it works properly and homes your X axis.  Then cut/paste the C code into the Mach3Home.c program where it says "Home the X axis"
> > >  
> > > Regards
> > > TK
> > >  
> > >  
> > > From: Bengt Sjoelund <cnc@>
> > > To: DynoMotion@yahoogroups.com
> > > Sent: Monday, April 16, 2012 5:08 AM
> > > Subject: [DynoMotion] Re: How to setup bits
> > >
> > >
> > >  
> > > Hi Tom,
> > >
> > > Mach3 motor setup X/Y/Z is 2000/2000/4000.
> > > My init file in my folder combimill 3axis.c
> > >
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > >
> > > > Hi Bengt,
> > > > ÃÆ'‚ 
> > > > KFLOP C Programs work in counts or microsteps (not mm).ÃÆ'‚  What is the resolution of your axes?
> > > > ÃÆ'‚ 
> > > > Regards
> > > > TK
> > > >
> > > > From: Bengt Sjoelund <cnc@>
> > > > To: DynoMotion@yahoogroups.com
> > > > Sent: Sunday, April 15, 2012 11:48 AM
> > > > Subject: [DynoMotion] Re: How to setup bits
> > > >
> > > >
> > > > ÃÆ'‚ 
> > > > Hi Tom,
> > > >
> > > > #1 Have separate home switches = BIT137 for XYZ
> > > > #2 Z-X-Y + A axis and spindle ( A also to be secondary spindle = mini lathe on mill, AC servo + 5C collet chuck)
> > > > #3 Towards - (minus)
> > > > #4 500mm?
> > > > #5 50mm?
> > > > #6 BIT137 for X/Y/Z JP5/Z+ signals IO42=Z/IO40=X/IO41=Y/(IO43=A/IO38=Sp)
> > > > #7 NC
> > > > #8 <5mm
> > > > #9 After each axis is 'homed' 2s delay
> > > >
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> > > > >
> > > > > Hi Bengt,
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > The standard Mach3 "REF ALL HOME" should work properly and home all 3 axes starting with Z. That Mach3 button actually has VB code to do 3 homing calls to the Plugin.
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Yes I know setting up homing is hard but it isn't that hard :}
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Troy's program has ~24 lines of C per axis.ÃÆ'Æ'‚ÃÆ'‚  Where each line is in logical sequence and very simple.ÃÆ'Æ'‚ÃÆ'‚  In general the program must define:
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #1 -ÃÆ'Æ'‚ÃÆ'‚ the technique to use - in this case it is "use limit as home switch, move fast into switch, slow back out of switch, then move a bit more, then switch home back to a limit"
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #2 -ÃÆ'Æ'‚ÃÆ'‚ which axis to home
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #3 - Direction to home
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #4 - Initial Fast Speed
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #5 - Slow speed
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #6 - what Input to use for home
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #7 - Input polarity
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #8 - How far to move inside switch
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > #9 - any neccessary delays and where to put them
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > So any definition even in English (or Italian) that completely defines what to do will have similar complexity.
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Answer the above questions for each axis in your system and I will modify the Home Program for you.
> > > > > ÃÆ'Æ'‚ÃÆ'‚ ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Regards
> > > > > TK
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > From: Bengt Sjoelund <cnc@>
> > > > > To: DynoMotion@yahoogroups.com
> > > > > Sent: Sunday, April 15, 2012 8:09 AM
> > > > > Subject: [DynoMotion] Re: How to setup bits
> > > > >
> > > > >
> > > > > ÃÆ'Æ'‚ÃÆ'‚ 
> > > > > Hi Troy,
> > > > > I am expecting axes to move to switches and Reference.
> > > > >
> > > > > Step 1 is to get the mechanical home switches to work, after that step 2 would be to use the Index pulse for more precise reference.
> > > > >
> > > > > This work on my mill takes some time but I am getting closer as I now have movment on each axis with no problems, so far so good.
> > > > >
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > When you say homeing, are you expecting axes to move to switches and Reference? Or do you just want the axes to move to home position?
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > > That is a lot of code, no way to do it simpler? ;)
> > > > > > > So what I understand I cannot use the Mach3 homeing button on std mill screen, right? Is it so that I have to manually home aech axis one by one with the risk of not taking Z first?
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4645 From: Bengt Sjoelund Date: 4/25/2012
Subject: Re: How to setup bits
Hi Tom,

Can you have a look in my folder for CombiMillMach3Home

If I stand in front of my X-axis I have the home posoition up in left corner and the knee is coming high up (this is the way it has been from the factory, later on I will change this to left down corner and Z knee way down in positive.

Can my edit of the Mach3Home.c be correct? I have changed the move to 5mm off the mechanical switch and added move according to Index.

Cheers
Bengt
Group: DynoMotion Message: 4648 From: Tom Kerekes Date: 4/25/2012
Subject: Re: How to setup bits
Hi Bengt,
 
No you are forgetting to reverse direction.  For example the idea is to Jog some direction until we hit the switch.  Then come to a stop.  Then reverse direction to Jog out of the switch.  But your program Jogs into a switch, stops, then keeps jogging the same direction further into the switch.  You also might consider moving more slowly when moving back out of the switch.  So change the:
 
       Jog(X,15000);                 // start moving positive
        .
        .
        .
       Jog(X,15000);                   // start moving positive slower
 
to
 
       Jog(X,15000);                 // start moving positive
        .
        .
        .
       Jog(X,-1500);                   // start moving negative slower
 
 
Also in your program after it detects the Index (bit40) you command the axis to stop with a Jog(X,0);  This only starts to stop.  So the next command to disable the axis would happen while it was still moving causing an abrupt stop.  Better to wait until the axis is finished stopping so after the command to stop add:
 
    while (!CheckDone(X)) ;
 
Regards
TK
 
 
 
Group: DynoMotion Message: 4657 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Hi Tom,

The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)

I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?

Ports and pins in Mach3 ? Maybe it is here I have don something wrong.

As always I appreciate you taking time helping us get machines running!
Cheers
Bengt

#include "KMotionDef.h"

//Plugin calls for Mach3 Home (actually Purge) Commands

main()
{


// Home the X-axis


#define X 0

DisableAxis(X);

Zero(X);

EnableAxisDest(X,0.0);

Jog(X,5000); // start moving positive

while (ReadBit(137)) ; // wait for switch (input #137) to change low

Jog(X,0); // StopMotion

while(!CheckDone(X)) ;

Jog(X,-15000); // start moving negative slower

while (!ReadBit(137)) ; // wait for switch (input #137) to change high

Jog(X,0); // StopMotion

while(!CheckDone(X)) ; // wait until stopped

MoveRel(X,5*2000); // move 5mm further negative

while(!CheckDone(X)) ; // wait until done moving

Delay_sec(2); // settle out for a while

while(ReadBit(40)) ; // keep moving positive until we see the index pulse

Jog(X,0); // stop

while (!CheckDone(X)) ;

DisableAxis(X);

Zero(X); // Zero the Encoder

EnableAxisDest(X,0.0); // Re-enable the axis and command position zero



// Home the Y-axis

#define y 1

DisableAxis(y);

Zero(y);

EnableAxisDest(y,0.0);

Jog(y,5000); // start moving negative

while (ReadBit(137)) ; // wait for switch (input #137) to change low

Jog(y,0); // StopMotion

while(!CheckDone(y)) ;

Jog(y,15000); // start moving positive slower

while (!ReadBit(137)) ; // wait for switch (input #137) to change high

Jog(y,0); // StopMotion

while(!CheckDone(y)) ; // wait until stopped

MoveRel(y,-5*2000); // move 5mm further positive

while(!CheckDone(y)) ; // wait until done moving

Delay_sec(2); // settle out for a while

while(!ReadBit(41)) ; // keep moving positive until we see the index pulse

Jog(y,0); // stop

while (!CheckDone(y)) ;

DisableAxis(y);

Zero(y); // Zero the Encoder

EnableAxisDest(y,0.0); // Re-enable the axis and command position zero



// Home the Z-axis

#define z 2

DisableAxis(z);

Zero(z);

EnableAxisDest(z,0.0);

Jog(z,-5000); // start moving negative

while (ReadBit(137)) ; // wait for switch (input #137) to change low

Jog(z,0); // StopMotion

while(!CheckDone(z)) ;

Jog(z,15000); // start moving positive slower

while (!ReadBit(137)) ; // wait for switch (input #137) to change high

Jog(z,0); // StopMotion

while(!CheckDone(z)) ; // wait until stopped

MoveRel(z,-5*2000); // move 5mm further negative

while(!CheckDone(z)) ; // wait until done moving

Delay_sec(2); // settle out for a while

while(ReadBit(42)) ; // keep moving negative until we see the index pulse

Jog(z,0); // stop

while (!CheckDone(z)) ;

DisableAxis(z);

Zero(z); // Zero the Encoder

EnableAxisDest(z,0.0); // Re-enable the axis and command position zero


}
Group: DynoMotion Message: 4658 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Hi Tom,

Have been down in my shop trying to get this to work in Mach3

In my folder there is a new file Updated HomeMach3.c

This is not working, no G28 in MDI

So I did a new setup of the Plugin with NotifyMach3 and in MDI and G28
I get movment on Z axis in full speed (G0) passing Home switch and stopping in Limit showing a message buffer something overrun (forgot to take the notebook with me).

So I question if the 'original' HomeMach3 is correct where insert functioning code that works in KMotion?

There is probably something simple I have missed but I just can't get this to work in Mach.

Would be grateful with some assist, have no probelems in my other machines running Mach3. Feel like a fish without water just now.

Cheers
Bengt
Group: DynoMotion Message: 4659 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
Hi Bengt,
Hope iam not intruding here.
Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Tom,
>
> The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
>
> I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
>
> Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
>
> As always I appreciate you taking time helping us get machines running!
> Cheers
> Bengt
>
> #include "KMotionDef.h"
>
> //Plugin calls for Mach3 Home (actually Purge) Commands
>
> main()
> {
>
>
> // Home the X-axis
>
>
> #define X 0
>
> DisableAxis(X);
>
> Zero(X);
>
> EnableAxisDest(X,0.0);
>
> Jog(X,5000); // start moving positive
>
> while (ReadBit(137)) ; // wait for switch (input #137) to change low
>
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ;
>
> Jog(X,-15000); // start moving negative slower
>
> while (!ReadBit(137)) ; // wait for switch (input #137) to change high
>
> Jog(X,0); // StopMotion
>
> while(!CheckDone(X)) ; // wait until stopped
>
> MoveRel(X,5*2000); // move 5mm further negative
>
> while(!CheckDone(X)) ; // wait until done moving
>
> Delay_sec(2); // settle out for a while
>
> while(ReadBit(40)) ; // keep moving positive until we see the index pulse
>
> Jog(X,0); // stop
>
> while (!CheckDone(X)) ;
>
> DisableAxis(X);
>
> Zero(X); // Zero the Encoder
>
> EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
>
>
>
> // Home the Y-axis
>
> #define y 1
>
> DisableAxis(y);
>
> Zero(y);
>
> EnableAxisDest(y,0.0);
>
> Jog(y,5000); // start moving negative
>
> while (ReadBit(137)) ; // wait for switch (input #137) to change low
>
> Jog(y,0); // StopMotion
>
> while(!CheckDone(y)) ;
>
> Jog(y,15000); // start moving positive slower
>
> while (!ReadBit(137)) ; // wait for switch (input #137) to change high
>
> Jog(y,0); // StopMotion
>
> while(!CheckDone(y)) ; // wait until stopped
>
> MoveRel(y,-5*2000); // move 5mm further positive
>
> while(!CheckDone(y)) ; // wait until done moving
>
> Delay_sec(2); // settle out for a while
>
> while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
>
> Jog(y,0); // stop
>
> while (!CheckDone(y)) ;
>
> DisableAxis(y);
>
> Zero(y); // Zero the Encoder
>
> EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
>
>
>
> // Home the Z-axis
>
> #define z 2
>
> DisableAxis(z);
>
> Zero(z);
>
> EnableAxisDest(z,0.0);
>
> Jog(z,-5000); // start moving negative
>
> while (ReadBit(137)) ; // wait for switch (input #137) to change low
>
> Jog(z,0); // StopMotion
>
> while(!CheckDone(z)) ;
>
> Jog(z,15000); // start moving positive slower
>
> while (!ReadBit(137)) ; // wait for switch (input #137) to change high
>
> Jog(z,0); // StopMotion
>
> while(!CheckDone(z)) ; // wait until stopped
>
> MoveRel(z,-5*2000); // move 5mm further negative
>
> while(!CheckDone(z)) ; // wait until done moving
>
> Delay_sec(2); // settle out for a while
>
> while(ReadBit(42)) ; // keep moving negative until we see the index pulse
>
> Jog(z,0); // stop
>
> while (!CheckDone(z)) ;
>
> DisableAxis(z);
>
> Zero(z); // Zero the Encoder
>
> EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
>
>
> }
>
Group: DynoMotion Message: 4660 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Hi Troy,

You are not at all intruding, like to hear from other users.
Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
Cheers
Bengt

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Hi Bengt,
> Hope iam not intruding here.
> Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Tom,
> >
> > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> >
> > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> >
> > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> >
> > As always I appreciate you taking time helping us get machines running!
> > Cheers
> > Bengt
> >
> > #include "KMotionDef.h"
> >
> > //Plugin calls for Mach3 Home (actually Purge) Commands
> >
> > main()
> > {
> >
> >
> > // Home the X-axis
> >
> >
> > #define X 0
> >
> > DisableAxis(X);
> >
> > Zero(X);
> >
> > EnableAxisDest(X,0.0);
> >
> > Jog(X,5000); // start moving positive
> >
> > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> >
> > Jog(X,0); // StopMotion
> >
> > while(!CheckDone(X)) ;
> >
> > Jog(X,-15000); // start moving negative slower
> >
> > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> >
> > Jog(X,0); // StopMotion
> >
> > while(!CheckDone(X)) ; // wait until stopped
> >
> > MoveRel(X,5*2000); // move 5mm further negative
> >
> > while(!CheckDone(X)) ; // wait until done moving
> >
> > Delay_sec(2); // settle out for a while
> >
> > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> >
> > Jog(X,0); // stop
> >
> > while (!CheckDone(X)) ;
> >
> > DisableAxis(X);
> >
> > Zero(X); // Zero the Encoder
> >
> > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> >
> >
> >
> > // Home the Y-axis
> >
> > #define y 1
> >
> > DisableAxis(y);
> >
> > Zero(y);
> >
> > EnableAxisDest(y,0.0);
> >
> > Jog(y,5000); // start moving negative
> >
> > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> >
> > Jog(y,0); // StopMotion
> >
> > while(!CheckDone(y)) ;
> >
> > Jog(y,15000); // start moving positive slower
> >
> > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> >
> > Jog(y,0); // StopMotion
> >
> > while(!CheckDone(y)) ; // wait until stopped
> >
> > MoveRel(y,-5*2000); // move 5mm further positive
> >
> > while(!CheckDone(y)) ; // wait until done moving
> >
> > Delay_sec(2); // settle out for a while
> >
> > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> >
> > Jog(y,0); // stop
> >
> > while (!CheckDone(y)) ;
> >
> > DisableAxis(y);
> >
> > Zero(y); // Zero the Encoder
> >
> > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> >
> >
> >
> > // Home the Z-axis
> >
> > #define z 2
> >
> > DisableAxis(z);
> >
> > Zero(z);
> >
> > EnableAxisDest(z,0.0);
> >
> > Jog(z,-5000); // start moving negative
> >
> > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> >
> > Jog(z,0); // StopMotion
> >
> > while(!CheckDone(z)) ;
> >
> > Jog(z,15000); // start moving positive slower
> >
> > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> >
> > Jog(z,0); // StopMotion
> >
> > while(!CheckDone(z)) ; // wait until stopped
> >
> > MoveRel(z,-5*2000); // move 5mm further negative
> >
> > while(!CheckDone(z)) ; // wait until done moving
> >
> > Delay_sec(2); // settle out for a while
> >
> > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> >
> > Jog(z,0); // stop
> >
> > while (!CheckDone(z)) ;
> >
> > DisableAxis(z);
> >
> > Zero(z); // Zero the Encoder
> >
> > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> >
> >
> > }
> >
>
Group: DynoMotion Message: 4661 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
Is the VB code in the Ref All Button correct?
This is the VB that is in mine...
DoButton( 24 )
DoButton( 23 )
DoButton( 22 )
DoButton( 25 )

DoOEMButton(133)
DoOEMButton(134)
DoOEMButton(135)

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Hi Troy,
>
> You are not at all intruding, like to hear from other users.
> Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> Cheers
> Bengt
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > Hi Bengt,
> > Hope iam not intruding here.
> > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Tom,
> > >
> > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > >
> > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > >
> > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > >
> > > As always I appreciate you taking time helping us get machines running!
> > > Cheers
> > > Bengt
> > >
> > > #include "KMotionDef.h"
> > >
> > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > >
> > > main()
> > > {
> > >
> > >
> > > // Home the X-axis
> > >
> > >
> > > #define X 0
> > >
> > > DisableAxis(X);
> > >
> > > Zero(X);
> > >
> > > EnableAxisDest(X,0.0);
> > >
> > > Jog(X,5000); // start moving positive
> > >
> > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > >
> > > Jog(X,0); // StopMotion
> > >
> > > while(!CheckDone(X)) ;
> > >
> > > Jog(X,-15000); // start moving negative slower
> > >
> > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > >
> > > Jog(X,0); // StopMotion
> > >
> > > while(!CheckDone(X)) ; // wait until stopped
> > >
> > > MoveRel(X,5*2000); // move 5mm further negative
> > >
> > > while(!CheckDone(X)) ; // wait until done moving
> > >
> > > Delay_sec(2); // settle out for a while
> > >
> > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > >
> > > Jog(X,0); // stop
> > >
> > > while (!CheckDone(X)) ;
> > >
> > > DisableAxis(X);
> > >
> > > Zero(X); // Zero the Encoder
> > >
> > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > >
> > >
> > >
> > > // Home the Y-axis
> > >
> > > #define y 1
> > >
> > > DisableAxis(y);
> > >
> > > Zero(y);
> > >
> > > EnableAxisDest(y,0.0);
> > >
> > > Jog(y,5000); // start moving negative
> > >
> > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > >
> > > Jog(y,0); // StopMotion
> > >
> > > while(!CheckDone(y)) ;
> > >
> > > Jog(y,15000); // start moving positive slower
> > >
> > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > >
> > > Jog(y,0); // StopMotion
> > >
> > > while(!CheckDone(y)) ; // wait until stopped
> > >
> > > MoveRel(y,-5*2000); // move 5mm further positive
> > >
> > > while(!CheckDone(y)) ; // wait until done moving
> > >
> > > Delay_sec(2); // settle out for a while
> > >
> > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > >
> > > Jog(y,0); // stop
> > >
> > > while (!CheckDone(y)) ;
> > >
> > > DisableAxis(y);
> > >
> > > Zero(y); // Zero the Encoder
> > >
> > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > >
> > >
> > >
> > > // Home the Z-axis
> > >
> > > #define z 2
> > >
> > > DisableAxis(z);
> > >
> > > Zero(z);
> > >
> > > EnableAxisDest(z,0.0);
> > >
> > > Jog(z,-5000); // start moving negative
> > >
> > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > >
> > > Jog(z,0); // StopMotion
> > >
> > > while(!CheckDone(z)) ;
> > >
> > > Jog(z,15000); // start moving positive slower
> > >
> > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > >
> > > Jog(z,0); // StopMotion
> > >
> > > while(!CheckDone(z)) ; // wait until stopped
> > >
> > > MoveRel(z,-5*2000); // move 5mm further negative
> > >
> > > while(!CheckDone(z)) ; // wait until done moving
> > >
> > > Delay_sec(2); // settle out for a while
> > >
> > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > >
> > > Jog(z,0); // stop
> > >
> > > while (!CheckDone(z)) ;
> > >
> > > DisableAxis(z);
> > >
> > > Zero(z); // Zero the Encoder
> > >
> > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > >
> > >
> > > }
> > >
> >
>
Group: DynoMotion Message: 4662 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Is the VB code in the Ref All Button correct?
> This is the VB that is in mine...
> DoButton( 24 )
> DoButton( 23 )
> DoButton( 22 )
> DoButton( 25 )
>
> DoOEMButton(133)
> DoOEMButton(134)
> DoOEMButton(135)
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Hi Troy,
> >
> > You are not at all intruding, like to hear from other users.
> > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > Cheers
> > Bengt
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > Hi Bengt,
> > > Hope iam not intruding here.
> > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Tom,
> > > >
> > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > >
> > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > >
> > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > >
> > > > As always I appreciate you taking time helping us get machines running!
> > > > Cheers
> > > > Bengt
> > > >
> > > > #include "KMotionDef.h"
> > > >
> > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > >
> > > > main()
> > > > {
> > > >
> > > >
> > > > // Home the X-axis
> > > >
> > > >
> > > > #define X 0
> > > >
> > > > DisableAxis(X);
> > > >
> > > > Zero(X);
> > > >
> > > > EnableAxisDest(X,0.0);
> > > >
> > > > Jog(X,5000); // start moving positive
> > > >
> > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > >
> > > > Jog(X,0); // StopMotion
> > > >
> > > > while(!CheckDone(X)) ;
> > > >
> > > > Jog(X,-15000); // start moving negative slower
> > > >
> > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > >
> > > > Jog(X,0); // StopMotion
> > > >
> > > > while(!CheckDone(X)) ; // wait until stopped
> > > >
> > > > MoveRel(X,5*2000); // move 5mm further negative
> > > >
> > > > while(!CheckDone(X)) ; // wait until done moving
> > > >
> > > > Delay_sec(2); // settle out for a while
> > > >
> > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > >
> > > > Jog(X,0); // stop
> > > >
> > > > while (!CheckDone(X)) ;
> > > >
> > > > DisableAxis(X);
> > > >
> > > > Zero(X); // Zero the Encoder
> > > >
> > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > >
> > > >
> > > >
> > > > // Home the Y-axis
> > > >
> > > > #define y 1
> > > >
> > > > DisableAxis(y);
> > > >
> > > > Zero(y);
> > > >
> > > > EnableAxisDest(y,0.0);
> > > >
> > > > Jog(y,5000); // start moving negative
> > > >
> > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > >
> > > > Jog(y,0); // StopMotion
> > > >
> > > > while(!CheckDone(y)) ;
> > > >
> > > > Jog(y,15000); // start moving positive slower
> > > >
> > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > >
> > > > Jog(y,0); // StopMotion
> > > >
> > > > while(!CheckDone(y)) ; // wait until stopped
> > > >
> > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > >
> > > > while(!CheckDone(y)) ; // wait until done moving
> > > >
> > > > Delay_sec(2); // settle out for a while
> > > >
> > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > >
> > > > Jog(y,0); // stop
> > > >
> > > > while (!CheckDone(y)) ;
> > > >
> > > > DisableAxis(y);
> > > >
> > > > Zero(y); // Zero the Encoder
> > > >
> > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > >
> > > >
> > > >
> > > > // Home the Z-axis
> > > >
> > > > #define z 2
> > > >
> > > > DisableAxis(z);
> > > >
> > > > Zero(z);
> > > >
> > > > EnableAxisDest(z,0.0);
> > > >
> > > > Jog(z,-5000); // start moving negative
> > > >
> > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > >
> > > > Jog(z,0); // StopMotion
> > > >
> > > > while(!CheckDone(z)) ;
> > > >
> > > > Jog(z,15000); // start moving positive slower
> > > >
> > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > >
> > > > Jog(z,0); // StopMotion
> > > >
> > > > while(!CheckDone(z)) ; // wait until stopped
> > > >
> > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > >
> > > > while(!CheckDone(z)) ; // wait until done moving
> > > >
> > > > Delay_sec(2); // settle out for a while
> > > >
> > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > >
> > > > Jog(z,0); // stop
> > > >
> > > > while (!CheckDone(z)) ;
> > > >
> > > > DisableAxis(z);
> > > >
> > > > Zero(z); // Zero the Encoder
> > > >
> > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > >
> > > >
> > > > }
> > > >
> > >
> >
>
Group: DynoMotion Message: 4663 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Sorry, long time no VB editing ;)
Yes my button is the same


--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > Is the VB code in the Ref All Button correct?
> > This is the VB that is in mine...
> > DoButton( 24 )
> > DoButton( 23 )
> > DoButton( 22 )
> > DoButton( 25 )
> >
> > DoOEMButton(133)
> > DoOEMButton(134)
> > DoOEMButton(135)
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Hi Troy,
> > >
> > > You are not at all intruding, like to hear from other users.
> > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > Cheers
> > > Bengt
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > >
> > > > Hi Bengt,
> > > > Hope iam not intruding here.
> > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Tom,
> > > > >
> > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > >
> > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > >
> > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > >
> > > > > As always I appreciate you taking time helping us get machines running!
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > > #include "KMotionDef.h"
> > > > >
> > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > >
> > > > > main()
> > > > > {
> > > > >
> > > > >
> > > > > // Home the X-axis
> > > > >
> > > > >
> > > > > #define X 0
> > > > >
> > > > > DisableAxis(X);
> > > > >
> > > > > Zero(X);
> > > > >
> > > > > EnableAxisDest(X,0.0);
> > > > >
> > > > > Jog(X,5000); // start moving positive
> > > > >
> > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > >
> > > > > Jog(X,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(X)) ;
> > > > >
> > > > > Jog(X,-15000); // start moving negative slower
> > > > >
> > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > >
> > > > > Jog(X,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > >
> > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > >
> > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > >
> > > > > Delay_sec(2); // settle out for a while
> > > > >
> > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > >
> > > > > Jog(X,0); // stop
> > > > >
> > > > > while (!CheckDone(X)) ;
> > > > >
> > > > > DisableAxis(X);
> > > > >
> > > > > Zero(X); // Zero the Encoder
> > > > >
> > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > >
> > > > >
> > > > >
> > > > > // Home the Y-axis
> > > > >
> > > > > #define y 1
> > > > >
> > > > > DisableAxis(y);
> > > > >
> > > > > Zero(y);
> > > > >
> > > > > EnableAxisDest(y,0.0);
> > > > >
> > > > > Jog(y,5000); // start moving negative
> > > > >
> > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > >
> > > > > Jog(y,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(y)) ;
> > > > >
> > > > > Jog(y,15000); // start moving positive slower
> > > > >
> > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > >
> > > > > Jog(y,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > >
> > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > >
> > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > >
> > > > > Delay_sec(2); // settle out for a while
> > > > >
> > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > >
> > > > > Jog(y,0); // stop
> > > > >
> > > > > while (!CheckDone(y)) ;
> > > > >
> > > > > DisableAxis(y);
> > > > >
> > > > > Zero(y); // Zero the Encoder
> > > > >
> > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > >
> > > > >
> > > > >
> > > > > // Home the Z-axis
> > > > >
> > > > > #define z 2
> > > > >
> > > > > DisableAxis(z);
> > > > >
> > > > > Zero(z);
> > > > >
> > > > > EnableAxisDest(z,0.0);
> > > > >
> > > > > Jog(z,-5000); // start moving negative
> > > > >
> > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > >
> > > > > Jog(z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(z)) ;
> > > > >
> > > > > Jog(z,15000); // start moving positive slower
> > > > >
> > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > >
> > > > > Jog(z,0); // StopMotion
> > > > >
> > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > >
> > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > >
> > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > >
> > > > > Delay_sec(2); // settle out for a while
> > > > >
> > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > >
> > > > > Jog(z,0); // stop
> > > > >
> > > > > while (!CheckDone(z)) ;
> > > > >
> > > > > DisableAxis(z);
> > > > >
> > > > > Zero(z); // Zero the Encoder
> > > > >
> > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > >
> > > > >
> > > > > }
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4664 From: Troy Date: 4/26/2012
Subject: Re: How to setup bits
Standard set should be correct. Go to Operator> Edit Button Script and click on Ref All Home button.
Troy

Sent from Android

Group: DynoMotion Message: 4665 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c

Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> Sorry, long time no VB editing ;)
> Yes my button is the same
>
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > Is the VB code in the Ref All Button correct?
> > > This is the VB that is in mine...
> > > DoButton( 24 )
> > > DoButton( 23 )
> > > DoButton( 22 )
> > > DoButton( 25 )
> > >
> > > DoOEMButton(133)
> > > DoOEMButton(134)
> > > DoOEMButton(135)
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Hi Troy,
> > > >
> > > > You are not at all intruding, like to hear from other users.
> > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > Cheers
> > > > Bengt
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > >
> > > > > Hi Bengt,
> > > > > Hope iam not intruding here.
> > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Tom,
> > > > > >
> > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > >
> > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > >
> > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > >
> > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > > > #include "KMotionDef.h"
> > > > > >
> > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > >
> > > > > > main()
> > > > > > {
> > > > > >
> > > > > >
> > > > > > // Home the X-axis
> > > > > >
> > > > > >
> > > > > > #define X 0
> > > > > >
> > > > > > DisableAxis(X);
> > > > > >
> > > > > > Zero(X);
> > > > > >
> > > > > > EnableAxisDest(X,0.0);
> > > > > >
> > > > > > Jog(X,5000); // start moving positive
> > > > > >
> > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > >
> > > > > > Jog(X,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(X)) ;
> > > > > >
> > > > > > Jog(X,-15000); // start moving negative slower
> > > > > >
> > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > >
> > > > > > Jog(X,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > >
> > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > >
> > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > >
> > > > > > Delay_sec(2); // settle out for a while
> > > > > >
> > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > >
> > > > > > Jog(X,0); // stop
> > > > > >
> > > > > > while (!CheckDone(X)) ;
> > > > > >
> > > > > > DisableAxis(X);
> > > > > >
> > > > > > Zero(X); // Zero the Encoder
> > > > > >
> > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > >
> > > > > >
> > > > > >
> > > > > > // Home the Y-axis
> > > > > >
> > > > > > #define y 1
> > > > > >
> > > > > > DisableAxis(y);
> > > > > >
> > > > > > Zero(y);
> > > > > >
> > > > > > EnableAxisDest(y,0.0);
> > > > > >
> > > > > > Jog(y,5000); // start moving negative
> > > > > >
> > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > >
> > > > > > Jog(y,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(y)) ;
> > > > > >
> > > > > > Jog(y,15000); // start moving positive slower
> > > > > >
> > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > >
> > > > > > Jog(y,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > >
> > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > >
> > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > >
> > > > > > Delay_sec(2); // settle out for a while
> > > > > >
> > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > >
> > > > > > Jog(y,0); // stop
> > > > > >
> > > > > > while (!CheckDone(y)) ;
> > > > > >
> > > > > > DisableAxis(y);
> > > > > >
> > > > > > Zero(y); // Zero the Encoder
> > > > > >
> > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > >
> > > > > >
> > > > > >
> > > > > > // Home the Z-axis
> > > > > >
> > > > > > #define z 2
> > > > > >
> > > > > > DisableAxis(z);
> > > > > >
> > > > > > Zero(z);
> > > > > >
> > > > > > EnableAxisDest(z,0.0);
> > > > > >
> > > > > > Jog(z,-5000); // start moving negative
> > > > > >
> > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > >
> > > > > > Jog(z,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(z)) ;
> > > > > >
> > > > > > Jog(z,15000); // start moving positive slower
> > > > > >
> > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > >
> > > > > > Jog(z,0); // StopMotion
> > > > > >
> > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > >
> > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > >
> > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > >
> > > > > > Delay_sec(2); // settle out for a while
> > > > > >
> > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > >
> > > > > > Jog(z,0); // stop
> > > > > >
> > > > > > while (!CheckDone(z)) ;
> > > > > >
> > > > > > DisableAxis(z);
> > > > > >
> > > > > > Zero(z); // Zero the Encoder
> > > > > >
> > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > >
> > > > > >
> > > > > > }
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4666 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)

--- In DynoMotion@yahoogroups.com, "tmday7" <tmday@...> wrote:
>
> Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
>
> Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> >
> > Sorry, long time no VB editing ;)
> > Yes my button is the same
> >
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > >
> > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > >
> > > > Is the VB code in the Ref All Button correct?
> > > > This is the VB that is in mine...
> > > > DoButton( 24 )
> > > > DoButton( 23 )
> > > > DoButton( 22 )
> > > > DoButton( 25 )
> > > >
> > > > DoOEMButton(133)
> > > > DoOEMButton(134)
> > > > DoOEMButton(135)
> > > >
> > > > Troy
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Hi Troy,
> > > > >
> > > > > You are not at all intruding, like to hear from other users.
> > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > Cheers
> > > > > Bengt
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > Hi Bengt,
> > > > > > Hope iam not intruding here.
> > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Tom,
> > > > > > >
> > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > >
> > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > >
> > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > >
> > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > > > #include "KMotionDef.h"
> > > > > > >
> > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > >
> > > > > > > main()
> > > > > > > {
> > > > > > >
> > > > > > >
> > > > > > > // Home the X-axis
> > > > > > >
> > > > > > >
> > > > > > > #define X 0
> > > > > > >
> > > > > > > DisableAxis(X);
> > > > > > >
> > > > > > > Zero(X);
> > > > > > >
> > > > > > > EnableAxisDest(X,0.0);
> > > > > > >
> > > > > > > Jog(X,5000); // start moving positive
> > > > > > >
> > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > >
> > > > > > > Jog(X,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(X)) ;
> > > > > > >
> > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > >
> > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > >
> > > > > > > Jog(X,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > >
> > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > >
> > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > >
> > > > > > > Delay_sec(2); // settle out for a while
> > > > > > >
> > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > >
> > > > > > > Jog(X,0); // stop
> > > > > > >
> > > > > > > while (!CheckDone(X)) ;
> > > > > > >
> > > > > > > DisableAxis(X);
> > > > > > >
> > > > > > > Zero(X); // Zero the Encoder
> > > > > > >
> > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > // Home the Y-axis
> > > > > > >
> > > > > > > #define y 1
> > > > > > >
> > > > > > > DisableAxis(y);
> > > > > > >
> > > > > > > Zero(y);
> > > > > > >
> > > > > > > EnableAxisDest(y,0.0);
> > > > > > >
> > > > > > > Jog(y,5000); // start moving negative
> > > > > > >
> > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > >
> > > > > > > Jog(y,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(y)) ;
> > > > > > >
> > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > >
> > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > >
> > > > > > > Jog(y,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > >
> > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > >
> > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > >
> > > > > > > Delay_sec(2); // settle out for a while
> > > > > > >
> > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > >
> > > > > > > Jog(y,0); // stop
> > > > > > >
> > > > > > > while (!CheckDone(y)) ;
> > > > > > >
> > > > > > > DisableAxis(y);
> > > > > > >
> > > > > > > Zero(y); // Zero the Encoder
> > > > > > >
> > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > // Home the Z-axis
> > > > > > >
> > > > > > > #define z 2
> > > > > > >
> > > > > > > DisableAxis(z);
> > > > > > >
> > > > > > > Zero(z);
> > > > > > >
> > > > > > > EnableAxisDest(z,0.0);
> > > > > > >
> > > > > > > Jog(z,-5000); // start moving negative
> > > > > > >
> > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > >
> > > > > > > Jog(z,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(z)) ;
> > > > > > >
> > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > >
> > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > >
> > > > > > > Jog(z,0); // StopMotion
> > > > > > >
> > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > >
> > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > >
> > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > >
> > > > > > > Delay_sec(2); // settle out for a while
> > > > > > >
> > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > >
> > > > > > > Jog(z,0); // stop
> > > > > > >
> > > > > > > while (!CheckDone(z)) ;
> > > > > > >
> > > > > > > DisableAxis(z);
> > > > > > >
> > > > > > > Zero(z); // Zero the Encoder
> > > > > > >
> > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > >
> > > > > > >
> > > > > > > }
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4667 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
:) Yup.
Tom did some coding for me a few years ago that would not work on my PC, then when i made my version of Mach3 the same as his, everything worked. I cant remember what we were doing.
I try to trouble shoot the easy stuff i have run into.;) As for coding, iam a complete novice.

Troy

--- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@...> wrote:
>
> There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> >
> > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Sorry, long time no VB editing ;)
> > > Yes my button is the same
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > >
> > > > > Is the VB code in the Ref All Button correct?
> > > > > This is the VB that is in mine...
> > > > > DoButton( 24 )
> > > > > DoButton( 23 )
> > > > > DoButton( 22 )
> > > > > DoButton( 25 )
> > > > >
> > > > > DoOEMButton(133)
> > > > > DoOEMButton(134)
> > > > > DoOEMButton(135)
> > > > >
> > > > > Troy
> > > > >
Group: DynoMotion Message: 4669 From: Tom Kerekes Date: 4/26/2012
Subject: Re: How to setup bits
Hi Bengt,
 
Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
 
Regards
TK

Group: DynoMotion Message: 4671 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?

Troy

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Bengt,
>  
> Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
>  
> Regards
> TK
>
> From: Bengt Sjoelund <cnc@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, April 26, 2012 11:00 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
>
> --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> >
> > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> >
> > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> >
> > Troy
> >
> > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > >
> > > Sorry, long time no VB editing ;)
> > > Yes my button is the same
> > >
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > >
> > > > > Is the VB code in the Ref All Button correct?
> > > > > This is the VB that is in mine...
> > > > > DoButton( 24 )
> > > > > DoButton( 23 )
> > > > > DoButton( 22 )
> > > > > DoButton( 25 )
> > > > >
> > > > > DoOEMButton(133)
> > > > > DoOEMButton(134)
> > > > > DoOEMButton(135)
> > > > >
> > > > > Troy
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > >
> > > > > > Hi Troy,
> > > > > >
> > > > > > You are not at all intruding, like to hear from other users.
> > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > Cheers
> > > > > > Bengt
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > >
> > > > > > > Hi Bengt,
> > > > > > > Hope iam not intruding here.
> > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > >
> > > > > > > Troy
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > >
> > > > > > > > Hi Tom,
> > > > > > > >
> > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > >
> > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > >
> > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > >
> > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > Cheers
> > > > > > > > Bengt
> > > > > > > >
> > > > > > > > #include "KMotionDef.h"
> > > > > > > >
> > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > >
> > > > > > > > main()
> > > > > > > > {
> > > > > > > >
> > > > > > > >
> > > > > > > > // Home the X-axis
> > > > > > > >
> > > > > > > >
> > > > > > > > #define X 0
> > > > > > > >
> > > > > > > > DisableAxis(X);
> > > > > > > >
> > > > > > > > Zero(X);
> > > > > > > >
> > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > >
> > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > >
> > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > >
> > > > > > > > Jog(X,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(X)) ;
> > > > > > > >
> > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > >
> > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > >
> > > > > > > > Jog(X,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > >
> > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > >
> > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > >
> > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > >
> > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > >
> > > > > > > > Jog(X,0); // stop
> > > > > > > >
> > > > > > > > while (!CheckDone(X)) ;
> > > > > > > >
> > > > > > > > DisableAxis(X);
> > > > > > > >
> > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > >
> > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > // Home the Y-axis
> > > > > > > >
> > > > > > > > #define y 1
> > > > > > > >
> > > > > > > > DisableAxis(y);
> > > > > > > >
> > > > > > > > Zero(y);
> > > > > > > >
> > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > >
> > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > >
> > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > >
> > > > > > > > Jog(y,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(y)) ;
> > > > > > > >
> > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > >
> > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > >
> > > > > > > > Jog(y,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > >
> > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > >
> > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > >
> > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > >
> > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > >
> > > > > > > > Jog(y,0); // stop
> > > > > > > >
> > > > > > > > while (!CheckDone(y)) ;
> > > > > > > >
> > > > > > > > DisableAxis(y);
> > > > > > > >
> > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > >
> > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > > > // Home the Z-axis
> > > > > > > >
> > > > > > > > #define z 2
> > > > > > > >
> > > > > > > > DisableAxis(z);
> > > > > > > >
> > > > > > > > Zero(z);
> > > > > > > >
> > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > >
> > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > >
> > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > >
> > > > > > > > Jog(z,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(z)) ;
> > > > > > > >
> > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > >
> > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > >
> > > > > > > > Jog(z,0); // StopMotion
> > > > > > > >
> > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > >
> > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > >
> > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > >
> > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > >
> > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > >
> > > > > > > > Jog(z,0); // stop
> > > > > > > >
> > > > > > > > while (!CheckDone(z)) ;
> > > > > > > >
> > > > > > > > DisableAxis(z);
> > > > > > > >
> > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > >
> > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > >
> > > > > > > >
> > > > > > > > }
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4672 From: Tom Kerekes Date: 4/26/2012
Subject: Re: How to setup bits
Hi Troy,
 
Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
 
Regards
TK

Group: DynoMotion Message: 4673 From: tmday7 Date: 4/26/2012
Subject: Re: How to setup bits
Ok. At least it looks important. ;)

Thanks,
Troy

--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Troy,
>  
> Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
>  
> Regards
> TK
>
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, April 26, 2012 11:33 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> >  
> > Regards
> > TK
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, April 26, 2012 11:00 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > >
> > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Sorry, long time no VB editing ;)
> > > > Yes my button is the same
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > Is the VB code in the Ref All Button correct?
> > > > > > This is the VB that is in mine...
> > > > > > DoButton( 24 )
> > > > > > DoButton( 23 )
> > > > > > DoButton( 22 )
> > > > > > DoButton( 25 )
> > > > > >
> > > > > > DoOEMButton(133)
> > > > > > DoOEMButton(134)
> > > > > > DoOEMButton(135)
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > >
> > > > > > > > Hi Bengt,
> > > > > > > > Hope iam not intruding here.
> > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Tom,
> > > > > > > > >
> > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > >
> > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > >
> > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > >
> > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > Cheers
> > > > > > > > > Bengt
> > > > > > > > >
> > > > > > > > > #include "KMotionDef.h"
> > > > > > > > >
> > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > >
> > > > > > > > > main()
> > > > > > > > > {
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the X-axis
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > #define X 0
> > > > > > > > >
> > > > > > > > > DisableAxis(X);
> > > > > > > > >
> > > > > > > > > Zero(X);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > >
> > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > >
> > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(X,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(X);
> > > > > > > > >
> > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the Y-axis
> > > > > > > > >
> > > > > > > > > #define y 1
> > > > > > > > >
> > > > > > > > > DisableAxis(y);
> > > > > > > > >
> > > > > > > > > Zero(y);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > >
> > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > >
> > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(y,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(y);
> > > > > > > > >
> > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the Z-axis
> > > > > > > > >
> > > > > > > > > #define z 2
> > > > > > > > >
> > > > > > > > > DisableAxis(z);
> > > > > > > > >
> > > > > > > > > Zero(z);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > >
> > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > >
> > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(z,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(z);
> > > > > > > > >
> > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > }
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>
Group: DynoMotion Message: 4674 From: Bengt Sjoelund Date: 4/26/2012
Subject: Re: How to setup bits
Hi Guys,

Thanks a lot for your support Tom, now I can home my axis in my CombiMill. One step closer to get the machine up and running, next step is to get the spindle encoder and VFD up and running controlled via Mach3 before I can start cutting.
Cheers
Bengt


--- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@...> wrote:
>
> Hi Troy,
>  
> Probably all that matters is that Home is disabled, but there is no need for the ++ and --.  Limits are no longer handled by Mach3 as it is not real-time capable.
>  
> Regards
> TK
>
> From: tmday7 <tmday@...>
> To: DynoMotion@yahoogroups.com
> Sent: Thursday, April 26, 2012 11:33 AM
> Subject: [DynoMotion] Re: How to setup bits
>
>
>  
> Hmmm... I have my ++ and -- enabled but the Home is disabled. Is this correct?
>
> Troy
>
> --- In DynoMotion@yahoogroups.com, Tom Kerekes <tk@> wrote:
> >
> > Hi Bengt,
> >  
> > Check that Homing Bits are not Enabled under Config Ports&Pins | Input Signals or Mach3 will not send Homing messages to the Pluigin.
> >  
> > Regards
> > TK
> >
> > From: Bengt Sjoelund <cnc@>
> > To: DynoMotion@yahoogroups.com
> > Sent: Thursday, April 26, 2012 11:00 AM
> > Subject: [DynoMotion] Re: How to setup bits
> >
> >
> >  
> > There should not be any difference in these basic things within Mach3 since way back, but who knows what B&Co have done (threading in lathe WAS working once upon a time)
> >
> > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > >
> > > Here is my location of homing file i use...C:\KMotion429\C Programs\HomeEncoderMach3(Version3).c
> > >
> > > Dont know if it matters but here is what iam currently running, Mach3 Version R3.043.022 Dynomotion Version 4.29
> > >
> > > Troy
> > >
> > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > >
> > > > Sorry, long time no VB editing ;)
> > > > Yes my button is the same
> > > >
> > > >
> > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > >
> > > > > Well that is good question, I take it for granted that 'std' Mach functions would work right out of the box with the plugin. If I recall it right I think Tom did write that it would. I am using 1024.set with no modifications. I will have to dig out som tools for screen editing ( I was hopeing that huzzle would be over after so many years wih Mach development).
> > > > >
> > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > >
> > > > > > Is the VB code in the Ref All Button correct?
> > > > > > This is the VB that is in mine...
> > > > > > DoButton( 24 )
> > > > > > DoButton( 23 )
> > > > > > DoButton( 22 )
> > > > > > DoButton( 25 )
> > > > > >
> > > > > > DoOEMButton(133)
> > > > > > DoOEMButton(134)
> > > > > > DoOEMButton(135)
> > > > > >
> > > > > > Troy
> > > > > >
> > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > >
> > > > > > > Hi Troy,
> > > > > > >
> > > > > > > You are not at all intruding, like to hear from other users.
> > > > > > > Yes I think I have it correct, as far as I know there is only one way to do it in Mach3 > Config > Config plugin > Dynomotion > set the path to the HomeMach3.c file and OK the setup.
> > > > > > > Cheers
> > > > > > > Bengt
> > > > > > >
> > > > > > > --- In DynoMotion@yahoogroups.com, "tmday7" <tmday@> wrote:
> > > > > > > >
> > > > > > > > Hi Bengt,
> > > > > > > > Hope iam not intruding here.
> > > > > > > > Is the Dynomotion plugin in Mach configured to use your HomeMach3.c?
> > > > > > > >
> > > > > > > > Troy
> > > > > > > >
> > > > > > > > --- In DynoMotion@yahoogroups.com, "Bengt Sjoelund" <cnc@> wrote:
> > > > > > > > >
> > > > > > > > > Hi Tom,
> > > > > > > > >
> > > > > > > > > The code below runs perfect in Kmotion, whatever I do I cannot get the the edited HomeMach3.c to function = nothing happends in Mach3 either using the REF ALL HOME button on first page or G28 in any form (G28.1)
> > > > > > > > >
> > > > > > > > > I have .053 and 4.28 installed, what actions do I have to do to get the homeing properly set-up in Mach3. Is there a MUST location for the files that I set in the plugin window or can I have these files in C:\Mach3\kmotion? Can these files be named how I want in plugin settings?
> > > > > > > > >
> > > > > > > > > Ports and pins in Mach3 ? Maybe it is here I have don something wrong.
> > > > > > > > >
> > > > > > > > > As always I appreciate you taking time helping us get machines running!
> > > > > > > > > Cheers
> > > > > > > > > Bengt
> > > > > > > > >
> > > > > > > > > #include "KMotionDef.h"
> > > > > > > > >
> > > > > > > > > //Plugin calls for Mach3 Home (actually Purge) Commands
> > > > > > > > >
> > > > > > > > > main()
> > > > > > > > > {
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the X-axis
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > #define X 0
> > > > > > > > >
> > > > > > > > > DisableAxis(X);
> > > > > > > > >
> > > > > > > > > Zero(X);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(X,0.0);
> > > > > > > > >
> > > > > > > > > Jog(X,5000); // start moving positive
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ;
> > > > > > > > >
> > > > > > > > > Jog(X,-15000); // start moving negative slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(X,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(X,5*2000); // move 5mm further negative
> > > > > > > > >
> > > > > > > > > while(!CheckDone(X)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(ReadBit(40)) ; // keep moving positive until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(X,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(X)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(X);
> > > > > > > > >
> > > > > > > > > Zero(X); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(X,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the Y-axis
> > > > > > > > >
> > > > > > > > > #define y 1
> > > > > > > > >
> > > > > > > > > DisableAxis(y);
> > > > > > > > >
> > > > > > > > > Zero(y);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(y,0.0);
> > > > > > > > >
> > > > > > > > > Jog(y,5000); // start moving negative
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ;
> > > > > > > > >
> > > > > > > > > Jog(y,15000); // start moving positive slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(y,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(y,-5*2000); // move 5mm further positive
> > > > > > > > >
> > > > > > > > > while(!CheckDone(y)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(!ReadBit(41)) ; // keep moving positive until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(y,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(y)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(y);
> > > > > > > > >
> > > > > > > > > Zero(y); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(y,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > // Home the Z-axis
> > > > > > > > >
> > > > > > > > > #define z 2
> > > > > > > > >
> > > > > > > > > DisableAxis(z);
> > > > > > > > >
> > > > > > > > > Zero(z);
> > > > > > > > >
> > > > > > > > > EnableAxisDest(z,0.0);
> > > > > > > > >
> > > > > > > > > Jog(z,-5000); // start moving negative
> > > > > > > > >
> > > > > > > > > while (ReadBit(137)) ; // wait for switch (input #137) to change low
> > > > > > > > >
> > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ;
> > > > > > > > >
> > > > > > > > > Jog(z,15000); // start moving positive slower
> > > > > > > > >
> > > > > > > > > while (!ReadBit(137)) ; // wait for switch (input #137) to change high
> > > > > > > > >
> > > > > > > > > Jog(z,0); // StopMotion
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ; // wait until stopped
> > > > > > > > >
> > > > > > > > > MoveRel(z,-5*2000); // move 5mm further negative
> > > > > > > > >
> > > > > > > > > while(!CheckDone(z)) ; // wait until done moving
> > > > > > > > >
> > > > > > > > > Delay_sec(2); // settle out for a while
> > > > > > > > >
> > > > > > > > > while(ReadBit(42)) ; // keep moving negative until we see the index pulse
> > > > > > > > >
> > > > > > > > > Jog(z,0); // stop
> > > > > > > > >
> > > > > > > > > while (!CheckDone(z)) ;
> > > > > > > > >
> > > > > > > > > DisableAxis(z);
> > > > > > > > >
> > > > > > > > > Zero(z); // Zero the Encoder
> > > > > > > > >
> > > > > > > > > EnableAxisDest(z,0.0); // Re-enable the axis and command position zero
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > }
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>